From b9f3c44797c8d72769281a541b8a95d1f6ec3df2 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 30 Jun 2011 14:49:12 +0000 Subject: [PATCH] Use the current instance instead of messing with $wgUser --- includes/User.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/User.php b/includes/User.php index 914065fb8f..fdf2688556 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2520,7 +2520,7 @@ class User { * @param $title Title of the article to look at */ function clearNotification( &$title ) { - global $wgUser, $wgUseEnotif, $wgShowUpdatedMarker; + global $wgUseEnotif, $wgShowUpdatedMarker; # Do nothing if the database is locked to writes if( wfReadOnly() ) { @@ -2548,13 +2548,11 @@ class User { // and when it does have to be executed, it can be on a slave // If this is the user's newtalk page, we always update the timestamp if( $title->getNamespace() == NS_USER_TALK && - $title->getText() == $wgUser->getName() ) + $title->getText() == $this->getName() ) { $watched = true; - } elseif ( $this->getId() == $wgUser->getId() ) { - $watched = $title->userIsWatching(); } else { - $watched = true; + $watched = $this->isWatched( $title ); } // If the page is watched by the user (or may be watched), update the timestamp on any -- 2.20.1