From: Alexandre Emsenhuber Date: Thu, 30 Jun 2011 14:49:12 +0000 (+0000) Subject: Use the current instance instead of messing with $wgUser X-Git-Tag: 1.31.0-rc.0~29162 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=b9f3c44797c8d72769281a541b8a95d1f6ec3df2;p=lhc%2Fweb%2Fwiklou.git Use the current instance instead of messing with $wgUser --- 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