X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialLockdb.php;h=2d087ca4f49cb7bcf6fc984c6523251921e8d1de;hb=4e618302d9e7b96c008d3dfa3c0554cff52d5222;hp=a229fa34f4511bc698b766a6d29c47875ab6e12e;hpb=40a628a501fc05bb00e834fe359ca4061925f320;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialLockdb.php b/includes/specials/SpecialLockdb.php index a229fa34f4..2d087ca4f4 100644 --- a/includes/specials/SpecialLockdb.php +++ b/includes/specials/SpecialLockdb.php @@ -34,7 +34,7 @@ class SpecialLockdb extends FormSpecialPage { } public function doesWrites() { - return true; + return false; } public function requiresWrite() { @@ -47,6 +47,9 @@ class SpecialLockdb extends FormSpecialPage { if ( !is_writable( dirname( $this->getConfig()->get( 'ReadOnlyFile' ) ) ) ) { throw new ErrorPageError( 'lockdb', 'lockfilenotwritable' ); } + if ( file_exists( $this->getConfig()->get( 'ReadOnlyFile' ) ) ) { + throw new ErrorPageError( 'lockdb', 'databaselocked' ); + } } protected function getFormFields() { @@ -65,9 +68,9 @@ class SpecialLockdb extends FormSpecialPage { } protected function alterForm( HTMLForm $form ) { - $form->setWrapperLegend( false ); - $form->setHeaderText( $this->msg( 'lockdbtext' )->parseAsBlock() ); - $form->setSubmitTextMsg( 'lockbtn' ); + $form->setWrapperLegend( false ) + ->setHeaderText( $this->msg( 'lockdbtext' )->parseAsBlock() ) + ->setSubmitTextMsg( 'lockbtn' ); } public function onSubmit( array $data ) { @@ -105,6 +108,10 @@ class SpecialLockdb extends FormSpecialPage { $out->addWikiMsg( 'lockdbsuccesstext' ); } + protected function getDisplayFormat() { + return 'ooui'; + } + protected function getGroupName() { return 'wiki'; }