15use Wikimedia\AtEase\AtEase;
26 parent::__construct(
'Unlockdb',
'siteadmin' );
40 parent::checkExecutePermissions( $user );
41 # If the lock file isn't writable, we can do sweet bugger all
52 'label-message' =>
'unlockconfirm',
59 ->setHeaderHtml( $this->
msg(
'unlockdbtext' )->parseAsBlock() )
60 ->setSubmitTextMsg(
'unlockbtn' );
65 if ( !$data[
'Confirm'] ) {
66 return Status::newFatal(
'locknoconfirm' );
70 AtEase::suppressWarnings();
71 $res = unlink( $readOnlyFile );
72 AtEase::restoreWarnings();
75 return Status::newGood();
77 return Status::newFatal(
'filedeleteerror', $readOnlyFile );
83 $out->addSubtitle( $this->
msg(
'unlockdbsuccesssub' ) );
84 $out->addWikiMsg(
'unlockdbsuccesstext' );
102class_alias( SpecialUnlockdb::class,
'SpecialUnlockdb' );
An error page which can definitely be safely rendered using the OutputPage.
A class containing constants representing the names of configuration variables.
const ReadOnlyFile
Name constant for the ReadOnlyFile setting, for use with Config::get()
Special page which uses an HTMLForm to handle processing.
getConfig()
Shortcut to get main config object.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.