(bug 6856) User::clearNotification() does not respect read-only mode
authorRob Church <robchurch@users.mediawiki.org>
Sun, 24 Dec 2006 02:52:02 +0000 (02:52 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Sun, 24 Dec 2006 02:52:02 +0000 (02:52 +0000)
RELEASE-NOTES
includes/User.php

index d5c0f26..dcffadd 100644 (file)
@@ -401,7 +401,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 8331) Added the change size value to watchlists; therefor made
   watchlists use RecentChange::newFromRow() instead of newFromCurRow()
 * (bug 8351) Fix undo for simple reverts
-
+* (bug 6856) User::clearNotification() does not respect read-only mode
 
 == Languages updated ==
 
index 752969c..05d6be7 100644 (file)
@@ -1703,6 +1703,11 @@ class User {
        function clearNotification( &$title ) {
                global $wgUser, $wgUseEnotif;
 
+               # Do nothing if the database is locked to writes
+               if( wfReadOnly() ) {
+                       return;
+               }
+
                if ($title->getNamespace() == NS_USER_TALK &&
                        $title->getText() == $this->getName() ) {
                        if (!wfRunHooks('UserClearNewTalkNotification', array(&$this)))