Bsitu has uploaded a new change for review.
https://gerrit.wikimedia.org/r/101059
Change subject: History in '4 hours ago' should not be included in 'Today'
......................................................................
History in '4 hours ago' should not be included in 'Today'
Change-Id: Iecfa74989cb409db799e500d701f29d06a40dd2e
---
M includes/View/History/HistoryRenderer.php
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/59/101059/1
diff --git a/includes/View/History/HistoryRenderer.php
b/includes/View/History/HistoryRenderer.php
index 26ae4ba..948c3f6 100644
--- a/includes/View/History/HistoryRenderer.php
+++ b/includes/View/History/HistoryRenderer.php
@@ -56,9 +56,12 @@
$timespans = array(
wfMessage( 'flow-history-last4' )->escaped() => array(
'from' => $timestampLast4, 'to' => null ),
- wfMessage( 'flow-history-day' )->escaped() => array(
'from' => $timestampDay, 'to' => $timestampLast4 ),
wfMessage( 'flow-history-week' )->escaped() => array(
'from' => $timestampWeek, 'to' => $timestampDay ),
);
+ // if now is within first 4 hours of the day, all histories
would be included in '4 hours ago'
+ if ( $timestampDay < $timestampLast4 ) {
+ $timespans[wfMessage( 'flow-history-day' )->escaped()]
= array( 'from' => $timestampDay, 'to' => $timestampLast4 );
+ }
// Find last timestamp.
$history->seek( $history->numRows() - 1 );
--
To view, visit https://gerrit.wikimedia.org/r/101059
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iecfa74989cb409db799e500d701f29d06a40dd2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits