Moved $wgShowUpdatedMarker checks to the right place
Change-Id: Icee2ec24aac5fe78f7204aabf434640251791cae
This commit is contained in:
parent
65b0335134
commit
14979be39d
2 changed files with 16 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue