<?php
/**
- *
- * @addtogroup SpecialPage
+ * @file
+ * @ingroup SpecialPage
*/
/**
$wgOut->permissionRequired( 'siteadmin' );
return;
}
-
+
# If the lock file isn't writable, we can do sweet bugger all
global $wgReadOnlyFile;
if( !is_writable( dirname( $wgReadOnlyFile ) ) ) {
/**
* A form to make the database readonly (eg for maintenance purposes).
- * @addtogroup SpecialPage
+ * @ingroup SpecialPage
*/
class DBLockForm {
var $reason = '';
global $wgOut, $wgUser;
$wgOut->setPagetitle( wfMsg( 'lockdb' ) );
- $wgOut->addWikiText( wfMsg( 'lockdbtext' ) );
+ $wgOut->addWikiMsg( 'lockdbtext' );
if ( "" != $err ) {
$wgOut->setSubtitle( wfMsg( 'formerror' ) );
# 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' );
$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' );
}
-
}
-
-