X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialLockdb.php;h=a276197d4d7e0516d01f299ec461505cbd3fded4;hb=6ecdc5cd27d53442dd379928fcd831a86eeb07f6;hp=338240548c73e696e3668fa369714a142d5745f7;hpb=ee9d87560773b147ed0888377c6885a042af8cb1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialLockdb.php b/includes/specials/SpecialLockdb.php index 338240548c..a276197d4d 100644 --- a/includes/specials/SpecialLockdb.php +++ b/includes/specials/SpecialLockdb.php @@ -38,11 +38,9 @@ class SpecialLockdb 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 ( !is_writable( dirname( $wgReadOnlyFile ) ) ) { + if ( !is_writable( dirname( $this->getConfig()->get( 'ReadOnlyFile' ) ) ) ) { throw new ErrorPageError( 'lockdb', 'lockfilenotwritable' ); } } @@ -69,15 +67,15 @@ class SpecialLockdb extends FormSpecialPage { } public function onSubmit( array $data ) { - global $wgContLang, $wgReadOnlyFile; + global $wgContLang; if ( !$data['Confirm'] ) { return Status::newFatal( 'locknoconfirm' ); } - wfSuppressWarnings(); - $fp = fopen( $wgReadOnlyFile, 'w' ); - wfRestoreWarnings(); + MediaWiki\suppressWarnings(); + $fp = fopen( $this->getConfig()->get( 'ReadOnlyFile' ), 'w' ); + MediaWiki\restoreWarnings(); if ( false === $fp ) { # This used to show a file not found error, but the likeliest reason for fopen()