From: Brion Vibber Date: Wed, 5 Oct 2005 01:23:22 +0000 (+0000) Subject: * Warn and abort if importDump.php called in read-only mode. X-Git-Tag: 1.6.0~1543 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=e1ac4eb1b9b5b0f025b8c9d018f0ea4829658114;p=lhc%2Fweb%2Fwiklou.git * Warn and abort if importDump.php called in read-only mode. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index fa797aae8a..5a187dd4b3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -126,6 +126,7 @@ fully support the editing toolbar, but was found to be too confusing. for a place to add in captcha-type extensions in the edit flow * Added filter options, compression piping, and multiple output streams for dumpBackup.php +* Warn and abort if importDump.php called in read-only mode. === Caveats === diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 3a58550c6b..f4e8d3c877 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -111,6 +111,10 @@ class BackupReader { } } +if( wfReadOnly() ) { + die( "Wiki is in read-only mode; you'll need to disable it for import to work.\n" ); +} + $reader = new BackupReader(); if( isset( $options['quiet'] ) ) { $reader->reporting = false;