summaryrefslogtreecommitdiff
path: root/includes/SpecialUnlockdb.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/SpecialUnlockdb.php')
-rw-r--r--includes/SpecialUnlockdb.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/includes/SpecialUnlockdb.php b/includes/SpecialUnlockdb.php
index a10d1ee0..6627f75f 100644
--- a/includes/SpecialUnlockdb.php
+++ b/includes/SpecialUnlockdb.php
@@ -11,10 +11,11 @@
function wfSpecialUnlockdb() {
global $wgUser, $wgOut, $wgRequest;
- if ( ! $wgUser->isAllowed('siteadmin') ) {
- $wgOut->developerRequired();
+ if( !$wgUser->isAllowed( 'siteadmin' ) ) {
+ $wgOut->permissionRequired( 'siteadmin' );
return;
}
+
$action = $wgRequest->getVal( 'action' );
$f = new DBUnlockForm();
@@ -38,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" ) );