Merge "Add some missing readonly checks:"
[lhc/web/wiklou.git] / includes / Title.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',