Moved $wgShowUpdatedMarker checks to the right place
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 15 Apr 2015 01:56:39 +0000 (18:56 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 15 Apr 2015 01:56:39 +0000 (18:56 -0700)
Change-Id: Icee2ec24aac5fe78f7204aabf434640251791cae

includes/Title.php
includes/actions/HistoryAction.php

index 9d53217..b0df15f 100644 (file)
@@ -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
index 7189372..85ff994 100644 (file)
@@ -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 = '';
                }