Add some missing readonly checks:
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 9 Feb 2013 17:58:56 +0000 (18:58 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 9 Feb 2013 17:58:56 +0000 (18:58 +0100)
* Do not allow working on Special:EditWatchlist
* Do not reset all notification markers
* Do not delete expired restrictions

Change-Id: I7a990c0a80b9c7a6340465dd082a110dafea8f14

includes/Title.php
includes/User.php
includes/specials/SpecialEditWatchlist.php

index 6aa4cd2..f59a5fc 100644 (file)
@@ -2777,6 +2777,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();