]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/specials/SpecialLockdb.php
MediaWiki 1.14.0
[autoinstallsdev/mediawiki.git] / includes / specials / SpecialLockdb.php
similarity index 90%
rename from includes/SpecialLockdb.php
rename to includes/specials/SpecialLockdb.php
index e57717e2d2b40b30e88dcd2ef5abd4bcce12edd6..5859d5b2c486cea1cdec6f3e0be1ee55ba9141a9 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
- *
- * @addtogroup SpecialPage
+ * @file
+ * @ingroup SpecialPage
  */
 
 /**
@@ -14,7 +14,7 @@ function wfSpecialLockdb() {
                $wgOut->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<p>(by " . $wgUser->getName() . " at " .
-                 $wgLang->timeanddate( wfTimestampNow() ) . ")\n" );
+                 $wgLang->timeanddate( wfTimestampNow() ) . ")</p>\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' );
        }
-       
 }
-
-