parent::__construct( 'Unlockdb', 'siteadmin' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function requiresWrite() {
return false;
}
}
protected function getFormFields() {
- return array(
- 'Confirm' => array(
+ return [
+ 'Confirm' => [
'type' => 'toggle',
'label-message' => 'unlockconfirm',
- ),
- );
+ ],
+ ];
}
protected function alterForm( HTMLForm $form ) {
}
$readOnlyFile = $this->getConfig()->get( 'ReadOnlyFile' );
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$res = unlink( $readOnlyFile );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( $res ) {
return Status::newGood();