From 2a28fa2cca806796c8a59ecb5050c5599c152263 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 12 Jul 2006 11:32:45 +0000 Subject: [PATCH] * (bug 6642) Don't offer to unlock the database when it isn't locked --- RELEASE-NOTES | 1 + includes/SpecialUnlockdb.php | 6 ++++++ languages/Messages.php | 1 + 3 files changed, 8 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8079a0dfbb..fe0fd10b53 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -59,6 +59,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Fix regression searching Ipblocklist with ugly URLs * (bug 6639) Use a consistent default for upload directories * Preserve entered reason when reporting unconfirmed lock on Special:Lockdb +* (bug 6642) Don't offer to unlock the database when it isn't locked == Languages updated == diff --git a/includes/SpecialUnlockdb.php b/includes/SpecialUnlockdb.php index 7808ac5534..6627f75ff8 100644 --- a/includes/SpecialUnlockdb.php +++ b/includes/SpecialUnlockdb.php @@ -39,6 +39,12 @@ class DBUnlockForm { { global $wgOut, $wgUser; + global $wgReadOnlyFile; + if( !file_exists( $wgReadOnlyFile ) ) { + $wgOut->addWikiText( wfMsg( 'databasenotlocked' ) ); + return; + } + $wgOut->setPagetitle( wfMsg( "unlockdb" ) ); $wgOut->addWikiText( wfMsg( "unlockdbtext" ) ); diff --git a/languages/Messages.php b/languages/Messages.php index 7f752b91f2..e7783d29f9 100644 --- a/languages/Messages.php +++ b/languages/Messages.php @@ -1346,6 +1346,7 @@ Please confirm that this is what you intend to do.',
Remember to [[Special:Unlockdb|remove the lock]] after your maintenance is complete.', 'unlockdbsuccesstext' => 'The database has been unlocked.', 'lockfilenotwritable' => 'The database lock file is not writable. To lock or unlock the database, this needs to be writable by the web server.', +'databasenotlocked' => 'The database is not locked.', # Make sysop 'makesysoptitle' => 'Make a user into a sysop', -- 2.20.1