<?php
/**
*
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
*/
/**
}
/**
- *
- * @package MediaWiki
- * @subpackage SpecialPage
+ * A form to make the database readonly (eg for maintenance purposes).
+ * @addtogroup 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' ) );
$lc = htmlspecialchars( wfMsg( 'lockconfirm' ) );
$lb = htmlspecialchars( wfMsg( 'lockbtn' ) );
$elr = htmlspecialchars( wfMsg( 'enterlockreason' ) );
- $titleObj = Title::makeTitle( NS_SPECIAL, 'Lockdb' );
+ $titleObj = SpecialPage::getTitleFor( 'Lockdb' );
$action = $titleObj->escapeLocalURL( 'action=submit' );
$reason = htmlspecialchars( $this->reason );
$token = htmlspecialchars( $wgUser->editToken() );
# 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 );
$wgLang->timeanddate( wfTimestampNow() ) . ")\n" );
fclose( $fp );
- $titleObj = Title::makeTitle( NS_SPECIAL, 'Lockdb' );
+ $titleObj = SpecialPage::getTitleFor( 'Lockdb' );
$wgOut->redirect( $titleObj->getFullURL( 'action=success' ) );
}
$wgOut->setPagetitle( wfMsg( 'lockdb' ) );
$wgOut->setSubtitle( wfMsg( 'lockdbsuccesssub' ) );
- $wgOut->addWikiText( wfMsg( 'lockdbsuccesstext' ) );
+ $wgOut->addWikiMsg( 'lockdbsuccesstext' );
}
- function notWritable() {
+ public static function notWritable() {
global $wgOut;
- $wgOut->errorPage( 'lockdb', 'lockfilenotwritable' );
+ $wgOut->showErrorPage( 'lockdb', 'lockfilenotwritable' );
}
}
-?>
+