X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/d7967d5e4460e08b6b258307afbca0596b18a3dd:/includes/SpecialLockdb.php..refs/tags/mediawiki-1.14.0:/includes/specials/SpecialLockdb.php diff --git a/includes/SpecialLockdb.php b/includes/specials/SpecialLockdb.php similarity index 90% rename from includes/SpecialLockdb.php rename to includes/specials/SpecialLockdb.php index e57717e2..5859d5b2 100644 --- a/includes/SpecialLockdb.php +++ b/includes/specials/SpecialLockdb.php @@ -1,7 +1,7 @@ permissionRequired( 'siteadmin' ); return; } - + # If the lock file isn't writable, we can do sweet bugger all global $wgReadOnlyFile; if( !is_writable( dirname( $wgReadOnlyFile ) ) ) { @@ -37,7 +37,7 @@ function wfSpecialLockdb() { /** * A form to make the database readonly (eg for maintenance purposes). - * @addtogroup SpecialPage + * @ingroup SpecialPage */ class DBLockForm { var $reason = ''; @@ -51,7 +51,7 @@ class DBLockForm { global $wgOut, $wgUser; $wgOut->setPagetitle( wfMsg( 'lockdb' ) ); - $wgOut->addWikiText( wfMsg( 'lockdbtext' ) ); + $wgOut->addWikiMsg( 'lockdbtext' ); if ( "" != $err ) { $wgOut->setSubtitle( wfMsg( 'formerror' ) ); @@ -104,12 +104,12 @@ END # This used to show a file not found error, but the likeliest reason for fopen() # to fail at this point is insufficient permission to write to the file...good old # is_writable() is plain wrong in some cases, it seems... - $this->notWritable(); + self::notWritable(); return; } fwrite( $fp, $this->reason ); fwrite( $fp, "\n

(by " . $wgUser->getName() . " at " . - $wgLang->timeanddate( wfTimestampNow() ) . ")\n" ); + $wgLang->timeanddate( wfTimestampNow() ) . ")

\n" ); fclose( $fp ); $titleObj = SpecialPage::getTitleFor( 'Lockdb' ); @@ -121,14 +121,11 @@ END $wgOut->setPagetitle( wfMsg( 'lockdb' ) ); $wgOut->setSubtitle( wfMsg( 'lockdbsuccesssub' ) ); - $wgOut->addWikiText( wfMsg( 'lockdbsuccesstext' ) ); + $wgOut->addWikiMsg( 'lockdbsuccesstext' ); } - + public static function notWritable() { global $wgOut; - $wgOut->errorPage( 'lockdb', 'lockfilenotwritable' ); + $wgOut->showErrorPage( 'lockdb', 'lockfilenotwritable' ); } - } - -