X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialLockdb.php;h=2d087ca4f49cb7bcf6fc984c6523251921e8d1de;hb=3198421632712b2a389eec5f222fd1c344ea74fc;hp=b759991ac841c944061e6f95471b88511e207c58;hpb=52bad71412c6aae3cfe6ebb943e3006188560876;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialLockdb.php b/includes/specials/SpecialLockdb.php index b759991ac8..2d087ca4f4 100644 --- a/includes/specials/SpecialLockdb.php +++ b/includes/specials/SpecialLockdb.php @@ -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'; }