From c1d5cea7111e4f9825b546700111693024744b36 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sun, 24 Dec 2006 02:52:02 +0000 Subject: [PATCH] (bug 6856) User::clearNotification() does not respect read-only mode --- RELEASE-NOTES | 2 +- includes/User.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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))) -- 2.20.1