* @return string|null
*/
public function getNotificationTimestamp( $user = null ) {
- global $wgUser, $wgShowUpdatedMarker;
+ global $wgUser;
// Assume current user if none given
if ( !$user ) {
}
// Check cache first
$uid = $user->getId();
- if ( !$uid || !$wgShowUpdatedMarker ) {
+ if ( !$uid ) {
return false;
}
// avoid isset here, as it'll return false for null entries
$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 = '';
}
$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 = '';
}