Merge "Add some missing readonly checks:"
authorIAlex <ialex.wiki@gmail.com>
Sun, 10 Feb 2013 13:16:50 +0000 (13:16 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 10 Feb 2013 13:16:50 +0000 (13:16 +0000)
includes/Title.php
includes/User.php
includes/specials/SpecialEditWatchlist.php

index 593e578..e0585f1 100644 (file)
@@ -2780,6 +2780,10 @@ class Title {
         * Purge expired restrictions from the page_restrictions table
         */
        static function purgeExpiredRestrictions() {
+               if ( wfReadOnly() ) {
+                       return;
+               }
+
                $dbw = wfGetDB( DB_MASTER );
                $dbw->delete(
                        'page_restrictions',
index a73414c..c2af93c 100644 (file)
@@ -2874,6 +2874,10 @@ class User {
         * the next change of any watched page.
         */
        public function clearAllNotifications() {
+               if ( wfReadOnly() ) {
+                       return;
+               }
+
                global $wgUseEnotif, $wgShowUpdatedMarker;
                if ( !$wgUseEnotif && !$wgShowUpdatedMarker ) {
                        $this->setNewtalk( false );
index 40971c7..7e1b44a 100644 (file)
@@ -77,6 +77,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                }
 
                $this->checkPermissions();
+               $this->checkReadOnly();
 
                $this->outputHeader();