From: Aaron Schulz Date: Wed, 15 Apr 2015 01:56:39 +0000 (-0700) Subject: Moved $wgShowUpdatedMarker checks to the right place X-Git-Tag: 1.31.0-rc.0~11707^2 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=14979be39dbb3af2a624bba498df4fb2b2362e69;p=lhc%2Fweb%2Fwiklou.git Moved $wgShowUpdatedMarker checks to the right place Change-Id: Icee2ec24aac5fe78f7204aabf434640251791cae --- diff --git a/includes/Title.php b/includes/Title.php index 9d5321742f..b0df15f044 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4409,7 +4409,7 @@ class Title { * @return string|null */ public function getNotificationTimestamp( $user = null ) { - global $wgUser, $wgShowUpdatedMarker; + global $wgUser; // Assume current user if none given if ( !$user ) { @@ -4417,7 +4417,7 @@ class Title { } // Check cache first $uid = $user->getId(); - if ( !$uid || !$wgShowUpdatedMarker ) { + if ( !$uid ) { return false; } // avoid isset here, as it'll return false for null entries diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index 7189372789..85ff9944ba 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -432,8 +432,13 @@ class HistoryPager extends ReverseChronologicalPager { $latest = ( $this->counter == 1 && $this->mIsFirst ); $firstInList = $this->counter == 1; $this->counter++; - $s = $this->historyLine( $this->lastRow, $row, - $this->getTitle()->getNotificationTimestamp( $this->getUser() ), $latest, $firstInList ); + + $notifTimestamp = $this->getConfig()->get( 'ShowUpdatedMarker' ) + ? $this->getTitle()->getNotificationTimestamp( $this->getUser() ) + : false; + + $s = $this->historyLine( + $this->lastRow, $row, $notifTimestamp, $latest, $firstInList ); } else { $s = ''; } @@ -532,8 +537,13 @@ class HistoryPager extends ReverseChronologicalPager { $next = $this->mPastTheEndRow; } $this->counter++; - $s = $this->historyLine( $this->lastRow, $next, - $this->getTitle()->getNotificationTimestamp( $this->getUser() ), $latest, $firstInList ); + + $notifTimestamp = $this->getConfig()->get( 'ShowUpdatedMarker' ) + ? $this->getTitle()->getNotificationTimestamp( $this->getUser() ) + : false; + + $s = $this->historyLine( + $this->lastRow, $next, $notifTimestamp, $latest, $firstInList ); } else { $s = ''; }