From: Rob Church Date: Sun, 24 Dec 2006 02:52:02 +0000 (+0000) Subject: (bug 6856) User::clearNotification() does not respect read-only mode X-Git-Tag: 1.31.0-rc.0~54780 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=c1d5cea7111e4f9825b546700111693024744b36;p=lhc%2Fweb%2Fwiklou.git (bug 6856) User::clearNotification() does not respect read-only mode --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d5c0f2602f..dcffaddcf5 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/User.php b/includes/User.php index 752969ccee..05d6be74ca 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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)))