X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUnlockdb.php;h=9214c2352d548090c8a533aa7dcd37dc5810f4af;hb=5c6a0cf57d98ed517b9470ba21e5b9e6141e0ea8;hp=a8b97d78bd723887b6ba37681dd620844c0f72ec;hpb=96366c1cf1966ca07e8f0b4361bbca28bfaf43a0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUnlockdb.php b/includes/specials/SpecialUnlockdb.php index a8b97d78bd..9214c2352d 100644 --- a/includes/specials/SpecialUnlockdb.php +++ b/includes/specials/SpecialUnlockdb.php @@ -32,6 +32,10 @@ class SpecialUnlockdb extends FormSpecialPage { parent::__construct( 'Unlockdb', 'siteadmin' ); } + public function doesWrites() { + return true; + } + public function requiresWrite() { return false; } @@ -45,12 +49,12 @@ class SpecialUnlockdb extends FormSpecialPage { } protected function getFormFields() { - return array( - 'Confirm' => array( + return [ + 'Confirm' => [ 'type' => 'toggle', 'label-message' => 'unlockconfirm', - ), - ); + ], + ]; } protected function alterForm( HTMLForm $form ) { @@ -65,9 +69,9 @@ class SpecialUnlockdb extends FormSpecialPage { } $readOnlyFile = $this->getConfig()->get( 'ReadOnlyFile' ); - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $res = unlink( $readOnlyFile ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( $res ) { return Status::newGood();