* @return TitleValue
*/
public static function getTitleValueFor( $name, $subpage = false, $fragment = '' ) {
- $name = SpecialPageFactory::getLocalNameFor( $name, $subpage );
+ $name = MediaWikiServices::getInstance()->getSpecialPageFactory()->
+ getLocalNameFor( $name, $subpage );
return new TitleValue( NS_SPECIAL, $name, $fragment );
}
* @return Title|null Title object or null if the page doesn't exist
*/
public static function getSafeTitleFor( $name, $subpage = false ) {
- $name = SpecialPageFactory::getLocalNameFor( $name, $subpage );
+ $name = MediaWikiServices::getInstance()->getSpecialPageFactory()->
+ getLocalNameFor( $name, $subpage );
if ( $name ) {
return Title::makeTitleSafe( NS_SPECIAL, $name );
} else {
*/
function getLocalName() {
if ( !isset( $this->mLocalName ) ) {
- $this->mLocalName = SpecialPageFactory::getLocalNameFor( $this->mName );
+ $this->mLocalName = MediaWikiServices::getInstance()->getSpecialPageFactory()->
+ getLocalNameFor( $this->mName );
}
return $this->mLocalName;
if ( $securityStatus === AuthManager::SEC_OK ) {
$uniqueId = $request->getVal( 'postUniqueId' );
if ( $uniqueId ) {
- $key = $key . ':' . $uniqueId;
+ $key .= ':' . $uniqueId;
$session = $request->getSession();
$data = $session->getSecret( $key );
if ( $data ) {
if ( $data ) {
// unique ID in case the same special page is open in multiple browser tabs
$uniqueId = MWCryptRand::generateHex( 6 );
- $key = $key . ':' . $uniqueId;
+ $key .= ':' . $uniqueId;
$queryParams['postUniqueId'] = $uniqueId;
$session = $request->getSession();
$session->persist(); // Just in case
* @param string $summaryMessageKey Message key of the summary
*/
function outputHeader( $summaryMessageKey = '' ) {
- global $wgContLang;
-
if ( $summaryMessageKey == '' ) {
- $msg = $wgContLang->lc( $this->getName() ) . '-summary';
+ $msg = MediaWikiServices::getInstance()->getContentLanguage()->lc( $this->getName() ) .
+ '-summary';
} else {
$msg = $summaryMessageKey;
}
return;
}
- global $wgContLang;
- $msg = $this->msg( $wgContLang->lc( $this->getName() ) . '-helppage' );
+ $msg = $this->msg(
+ MediaWikiServices::getInstance()->getContentLanguage()->lc( $this->getName() ) .
+ '-helppage' );
if ( !$msg->isDisabled() ) {
$helpUrl = Skin::makeUrl( $msg->plain() );