if ( '' != $query ) {
$q .= "&$query";
}
- $uploadTitle = Title::makeTitle( NS_SPECIAL, 'Upload' );
+ $uploadTitle = SpecialPage::getTitleFor( 'Upload' );
$url = $uploadTitle->escapeLocalURL( $q );
if ( '' == $text ) {
$url = $img->getURL();
$class = 'internal';
} else {
- $upload = Title::makeTitle( NS_SPECIAL, 'Upload' );
+ $upload = SpecialPage::getTitleFor( 'Upload' );
$url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $img->getName() ) );
$class = 'new';
}
function userLink( $userId, $userText ) {
$encName = htmlspecialchars( $userText );
if( $userId == 0 ) {
- $contribsPage = Title::makeTitle( NS_SPECIAL, 'Contributions' );
+ $contribsPage = SpecialPage::getTitleFor( 'Contributions' );
return $this->makeKnownLinkObj( $contribsPage,
$encName, 'target=' . urlencode( $userText ) );
} else {
$items[] = $this->userTalkLink( $userId, $userText );
}
if( $userId ) {
- $contribsPage = Title::makeTitle( NS_SPECIAL, 'Contributions' );
+ $contribsPage = SpecialPage::getTitleFor( 'Contributions' );
$items[] = $this->makeKnownLinkObj( $contribsPage,
wfMsgHtml( 'contribslink' ), 'target=' . urlencode( $userText ) );
}
* @private
*/
function blockLink( $userId, $userText ) {
- $blockPage = Title::makeTitle( NS_SPECIAL, 'Blockip' );
+ $blockPage = SpecialPage::getTitleFor( 'Blockip' );
$blockLink = $this->makeKnownLinkObj( $blockPage,
wfMsgHtml( 'blocklink' ), 'ip=' . urlencode( $userText ) );
return $blockLink;