Author: nickpj
Description:
root@bling:/var/www/hosts/mediawiki/wiki# svn diff includes/SpecialUnlockdb.php
Index: includes/SpecialUnlockdb.php
- includes/SpecialUnlockdb.php (revision 15560)
+++ includes/SpecialUnlockdb.php (working copy)
@@ -37,9 +37,15 @@
class DBUnlockForm {
function showForm( $err ) {
- global $wgOut, $wgUser;
+ global $wgOut, $wgUser, $wgReadOnlyFile;
$wgOut->setPagetitle( wfMsg( "unlockdb" ) );
+
+ if ( !file_exists($wgReadOnlyFile) ) {
+ $wgOut->addWikiText( "The database is not currently locked, so it cannot be
unlocked." );
+ return;
+ }
+
$wgOut->addWikiText( wfMsg( "unlockdbtext" ) ); if ( "" != $err ) {
root@bling:/var/www/hosts/mediawiki/wiki#
(but should use wfMsg instead of a hard-coded string).
Version: 1.8.x
Severity: trivial