function isSyndicated() {
return false;
}
-
+
/**
* Cache page existence for performance
*/
if( $this->isCached() ) {
$pageLink = $title->exists()
? '<s>' . $skin->link( $title ) . '</s>'
- : $skin->makeBrokenLinkObj( $title );
+ : $skin->link(
+ $title,
+ null,
+ array(),
+ array(),
+ array( 'broken' )
+ );
} else {
- $pageLink = $skin->makeBrokenLinkObj( $title );
+ $pageLink = $skin->link(
+ $title,
+ null,
+ array(),
+ array(),
+ array( 'broken' )
+ );
}
return wfSpecialList( $pageLink, $this->makeWlhLink( $title, $skin, $result ) );
} else {
$linkCache->addBadLinkObj( $title );
$colours[$pdbk] = 'new';
$output->addLink( $title, 0 );
+ // FIXME: replace deprecated makeBrokenLinkObj() by link()
$replacePairs[$searchkey] = $sk->makeBrokenLinkObj( $title,
$entry['text'],
$query );
} else {
+ // FIXME: replace deprecated makeColouredLinkObj() by link()
$replacePairs[$searchkey] = $sk->makeColouredLinkObj( $title, $colours[$pdbk],
$entry['text'],
$query );
$message = htmlspecialchars( $m['statmsg'] );
$mw = htmlspecialchars( $m['msg'] );
+ $linkText = "<span id=\"sp-allmessages-i-$i\">" . htmlspecialchars( $key ) . '</span>';
+
if( array_key_exists( $title, $pageExists[NS_MEDIAWIKI] ) ) {
// FIXME: the span should be taken care of in $customAttribs, shouldn't it?
$pageLink = $sk->linkKnown(
$titleObj,
- "<span id=\"sp-allmessages-i-$i\">" . htmlspecialchars( $key ) . '</span>'
+ $linkText
);
} else {
- $pageLink = $sk->makeBrokenLinkObj( $titleObj, "<span id=\"sp-allmessages-i-$i\">" .
- htmlspecialchars( $key ) . '</span>' );
+ $pageLink = $sk->link(
+ $titleObj,
+ $linkText,
+ array(),
+ array(),
+ array( 'broken' )
+ );
}
if( array_key_exists( $title, $pageExists[NS_MEDIAWIKI_TALK] ) ) {
$talkLink = $sk->linkKnown( $talkPage, htmlspecialchars( $talk ) );
} else {
- $talkLink = $sk->makeBrokenLinkObj( $talkPage, htmlspecialchars( $talk ) );
+ $talkLink = $sk->link(
+ $talkPage,
+ htmlspecialchars( $talk ),
+ array(),
+ array(),
+ array( 'broken' )
+ );
}
$anchor = 'msg_' . htmlspecialchars( strtolower( $title ) );
global $wgLang, $wgContLang;
$nt = Title::makeTitle( $result->namespace, $result->title );
- $text = $wgContLang->convert( $nt->getText() );
+ $text = htmlspecialchars( $wgContLang->convert( $nt->getText() ) );
$plink = $this->isCached() ?
- $skin->link( $nt, htmlspecialchars( $text ) ) :
- $skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) );
+ $skin->link( $nt, $text ) :
+ $skin->link(
+ $nt,
+ $text,
+ array(),
+ array(),
+ array( 'broken' )
+ );
$nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),
$wgLang->formatNum( $result->value ) );
function wlHoursLink( $h, $page, $options = array() ) {
global $wgUser, $wgLang, $wgContLang;
+
$sk = $wgUser->getSkin();
- $s = $sk->makeKnownLink(
- $wgContLang->specialPage( $page ),
- $wgLang->formatNum( $h ),
- wfArrayToCGI( array('days' => ($h / 24.0)), $options ) );
+ $title = Title::newFromText( $wgContLang->specialPage( $page ) );
+ $options['days'] = ($h / 24.0);
+
+ $s = $sk->linkKnown(
+ $title,
+ $wgLang->formatNum( $h ),
+ array(),
+ $options
+ );
+
return $s;
}
function wlDaysLink( $d, $page, $options = array() ) {
global $wgUser, $wgLang, $wgContLang;
+
$sk = $wgUser->getSkin();
- $s = $sk->makeKnownLink(
- $wgContLang->specialPage( $page ),
- ($d ? $wgLang->formatNum( $d ) : wfMsgHtml( 'watchlistall2' ) ),
- wfArrayToCGI( array('days' => $d), $options ) );
+ $title = Title::newFromText( $wgContLang->specialPage( $page ) );
+ $options['days'] = $d;
+ $message = ($d ? $wgLang->formatNum( $d ) : wfMsgHtml( 'watchlistall2' ) );
+
+ $s = $sk->linkKnown(
+ $title,
+ $message,
+ array(),
+ $options
+ );
+
return $s;
}
$rt = $this->mTitle->getPrefixedURL();
if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) {
- $q = '';
+ $q = array();
} else {
- $q = "returnto={$rt}";
+ $q = array( 'returnto' => $rt );
}
$s = array(
$this->mainPageLink(),
- $this->makeKnownLink( wfMsgForContent( 'aboutpage' ), wfMsg( 'about' ) ),
- $this->makeKnownLink( wfMsgForContent( 'helppage' ), wfMsg( 'help' ) ),
- $this->makeKnownLink( wfMsgForContent( 'faqpage' ), wfMsg( 'faq' ) ),
+ $this->linkKnown(
+ Title::newFromText( wfMsgForContent( 'aboutpage' ) ),
+ wfMsg( 'about' )
+ ),
+ $this->linkKnown(
+ Title::newFromText( wfMsgForContent( 'helppage' ) ),
+ wfMsg( 'help' )
+ ),
+ $this->linkKnown(
+ Title::newFromText( wfMsgForContent( 'faqpage' ) ),
+ wfMsg( 'faq' )
+ ),
$this->specialLink( 'specialpages' )
);
$s[] = $this->extensionTabLinks();
}
if ( $wgUser->isLoggedIn() ) {
- $s[] = $this->makeKnownLink( $lo, wfMsg( 'logout' ), $q );
+ $s[] = $this->linkKnown(
+ $lo,
+ wfMsg( 'logout' ),
+ array(),
+ $q
+ );
} else {
- $s[] = $this->makeKnownLink( $li, wfMsg( 'login' ), $q );
+ $s[] = $this->LinkKnown(
+ $li,
+ wfMsg( 'login' ),
+ array(),
+ $q
+ );
}
return $wgLang->pipeList( $s );
$s .= $this->menuHead( 'qbedit' );
$s .= '<strong>' . $this->editThisPage() . '</strong>';
- $s .= $sep . $this->makeKnownLink( wfMsgForContent( 'edithelppage' ), wfMsg( 'edithelp' ) );
+ $s .= $sep . $this->linkKnown(
+ Title::newFromText( wfMsgForContent( 'edithelppage' ) ),
+ wfMsg( 'edithelp' )
+ );
if( $wgUser->isLoggedIn() ) {
$s .= $sep . $this->moveThisPage();
if( $wgUser->isLoggedIn() ) {
$s.= $this->specialLink( 'watchlist' ) ;
- $s .= $sep . $this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
- wfMsg( 'mycontris' ), 'target=' . wfUrlencode( $wgUser->getName() ) );
+ $s .= $sep . $this->linkKnown(
+ Title::newFromText( $wgContLang->specialPage( 'Contributions' ) ),
+ wfMsg( 'mycontris' ),
+ array(),
+ array( 'target' => $wgUser->getName() )
+ );
}
// only show watchlist link if logged in
$s .= "\n<hr class='sep' />";
$link = $nstext . ':' . $link;
}
- $s .= $this->makeLink( $link, $text );
+ $s .= $this->link(
+ Title::newFromText( $link ),
+ $text
+ );
} elseif( $this->mTitle->getNamespace() != NS_SPECIAL ) {
# we just throw in a "New page" text to tell the user that he's in edit mode,
# and to avoid messing with the separator that is prepended to the next item
);
#if( $tns%2 && $action!='edit' && !$wpPreview) {
- #$s.= '<br />'.$this->makeKnownLink($wgTitle->getPrefixedText(),wfMsg('postcomment'),'action=edit§ion=new');
+ #$s.= '<br />'.$this->linkKnown( Title::newFromText( $wgTitle->getPrefixedText() ),wfMsg('postcomment'),array(),array('action'=>'edit','section'=>'new'));
#}
/*