From: Daniel Cannon Date: Tue, 16 Oct 2007 09:24:16 +0000 (+0000) Subject: (bug 11343) If the database is read-only, ensure that undelete fails. X-Git-Tag: 1.31.0-rc.0~51129 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=2e07d1844bbc630405d507e219f94cb278850808;p=lhc%2Fweb%2Fwiklou.git (bug 11343) If the database is read-only, ensure that undelete fails. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 544d594de3..6ee82f78fb 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/SpecialUndelete.php b/includes/SpecialUndelete.php index d6565cf939..786b4c9394 100644 --- a/includes/SpecialUndelete.php +++ b/includes/SpecialUndelete.php @@ -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 );