From e1ac4eb1b9b5b0f025b8c9d018f0ea4829658114 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 5 Oct 2005 01:23:22 +0000 Subject: [PATCH] * Warn and abort if importDump.php called in read-only mode. --- RELEASE-NOTES | 1 + maintenance/importDump.php | 4 ++++ 2 files changed, 5 insertions(+) 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; -- 2.20.1