(bug 11343) If the database is read-only, ensure that undelete fails.
authorDaniel Cannon <amidaniel@users.mediawiki.org>
Tue, 16 Oct 2007 09:24:16 +0000 (09:24 +0000)
committerDaniel Cannon <amidaniel@users.mediawiki.org>
Tue, 16 Oct 2007 09:24:16 +0000 (09:24 +0000)
RELEASE-NOTES
includes/SpecialUndelete.php

index 544d594..6ee82f7 100644 (file)
@@ -104,6 +104,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 11612) Days to show in recent changes cannot be larger than 7
 * (bug 11131) Change filearchive width/height columns to int for Postgres
 * Support plural in undeleted{revisions,revisions-files,files}
+* (bug 11343) If the database is read-only, ensure that undelete fails.
 
 === API changes in 1.12 ===
 
index d6565cf..786b4c9 100644 (file)
@@ -378,6 +378,8 @@ class PageArchive {
         * @return int number of revisions restored
         */
        private function undeleteRevisions( $timestamps ) {
+               if ( wfReadOnly() ) return 0;
+
                $restoreAll = empty( $timestamps );
                
                $dbw = wfGetDB( DB_MASTER );