From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- includes/specials/SpecialUnlockdb.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'includes/specials/SpecialUnlockdb.php') diff --git a/includes/specials/SpecialUnlockdb.php b/includes/specials/SpecialUnlockdb.php index 35141d80..a8b97d78 100644 --- a/includes/specials/SpecialUnlockdb.php +++ b/includes/specials/SpecialUnlockdb.php @@ -37,11 +37,9 @@ class SpecialUnlockdb extends FormSpecialPage { } public function checkExecutePermissions( User $user ) { - global $wgReadOnlyFile; - parent::checkExecutePermissions( $user ); # If the lock file isn't writable, we can do sweet bugger all - if ( !file_exists( $wgReadOnlyFile ) ) { + if ( !file_exists( $this->getConfig()->get( 'ReadOnlyFile' ) ) ) { throw new ErrorPageError( 'lockdb', 'databasenotlocked' ); } } @@ -62,20 +60,19 @@ class SpecialUnlockdb extends FormSpecialPage { } public function onSubmit( array $data ) { - global $wgReadOnlyFile; - if ( !$data['Confirm'] ) { return Status::newFatal( 'locknoconfirm' ); } + $readOnlyFile = $this->getConfig()->get( 'ReadOnlyFile' ); wfSuppressWarnings(); - $res = unlink( $wgReadOnlyFile ); + $res = unlink( $readOnlyFile ); wfRestoreWarnings(); if ( $res ) { return Status::newGood(); } else { - return Status::newFatal( 'filedeleteerror', $wgReadOnlyFile ); + return Status::newFatal( 'filedeleteerror', $readOnlyFile ); } } -- cgit v1.2.3-54-g00ecf