* @param $t Title object
*/
public function setTitle( $t ) {
- $this->getContext()->setTitle($t);
+ $this->getContext()->setTitle( $t );
}
/**
* for when rate limiting has triggered.
*/
public function rateLimited() {
- $this->setPageTitle( wfMsg( 'actionthrottled' ) );
- $this->setRobotPolicy( 'noindex,follow' );
- $this->setArticleRelated( false );
- $this->enableClientCache( false );
- $this->mRedirect = '';
- $this->clearHTML();
- $this->setStatusCode( 503 );
- $this->addWikiMsg( 'actionthrottledtext' );
-
- $this->returnToMain( null, $this->getTitle() );
+ throw new ThrottledError;
}
/**
}
}
- /**
- * Adds JS-based password security checker
- * @param $passwordId String ID of input box containing password
- * @param $retypeId String ID of input box containing retyped password
- * @return none
- */
- public function addPasswordSecurity( $passwordId, $retypeId ) {
- $data = array(
- 'password' => '#' . $passwordId,
- 'retype' => '#' . $retypeId,
- 'messages' => array(),
- );
- foreach ( array( 'password-strength', 'password-strength-bad', 'password-strength-mediocre',
- 'password-strength-acceptable', 'password-strength-good', 'password-retype', 'password-retype-mismatch'
- ) as $message ) {
- $data['messages'][$message] = wfMsg( $message );
- }
- $this->addScript( Html::inlineScript( 'var passwordSecurity=' . FormatJson::encode( $data ) ) );
- $this->addModules( 'mediawiki.legacy.password' );
- }
-
public function showFatalError( $message ) {
$this->setPageTitle( wfMsg( 'internalerror' ) );
$this->setRobotPolicy( 'noindex,nofollow' );
$ns = $title->getNamespace();
$nsname = MWNamespace::exists( $ns ) ? MWNamespace::getCanonicalName( $ns ) : $title->getNsText();
if ( $ns == NS_SPECIAL ) {
- $parts = SpecialPage::resolveAliasWithSubpage( $title->getDBkey() );
- $canonicalName = $parts[0];
+ list( $canonicalName, /*...*/ ) = SpecialPageFactory::resolveAlias( $title->getDBkey() );
} else {
$canonicalName = false; # bug 21115
}