Merge "Revert "Log the reason why revision->getContent() returns null""
[lhc/web/wiklou.git] / includes / specials / SpecialUnlockdb.php
index 9214c23..3135653 100644 (file)
@@ -33,7 +33,7 @@ class SpecialUnlockdb extends FormSpecialPage {
        }
 
        public function doesWrites() {
-               return true;
+               return false;
        }
 
        public function requiresWrite() {
@@ -58,9 +58,9 @@ class SpecialUnlockdb extends FormSpecialPage {
        }
 
        protected function alterForm( HTMLForm $form ) {
-               $form->setWrapperLegend( false );
-               $form->setHeaderText( $this->msg( 'unlockdbtext' )->parseAsBlock() );
-               $form->setSubmitTextMsg( 'unlockbtn' );
+               $form->setWrapperLegend( false )
+                       ->setHeaderText( $this->msg( 'unlockdbtext' )->parseAsBlock() )
+                       ->setSubmitTextMsg( 'unlockbtn' );
        }
 
        public function onSubmit( array $data ) {
@@ -69,9 +69,9 @@ class SpecialUnlockdb extends FormSpecialPage {
                }
 
                $readOnlyFile = $this->getConfig()->get( 'ReadOnlyFile' );
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                $res = unlink( $readOnlyFile );
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
 
                if ( $res ) {
                        return Status::newGood();
@@ -86,6 +86,10 @@ class SpecialUnlockdb extends FormSpecialPage {
                $out->addWikiMsg( 'unlockdbsuccesstext' );
        }
 
+       protected function getDisplayFormat() {
+               return 'ooui';
+       }
+
        protected function getGroupName() {
                return 'wiki';
        }