titles that might be present in database.
$title = Title::newFromId( $result->value );
$dp = Title::makeTitle( $result->namespace, $result->title );
- $from = $skin->makeKnownLinkObj( $title, '' );
- $edit = $skin->makeKnownLinkObj( $title, "(".wfMsgHtml("qbedit").")" , 'redirect=no&action=edit' );
+ $from = $skin->link( $title );
+ $edit = $skin->link( $title, "(".wfMsgHtml("qbedit").")", array(), array( 'redirect' => 'no', 'action' => 'edit' ) );
$arr = $wgContLang->getArrow();
- $to = $skin->makeKnownLinkObj( $dp, '' );
+ $to = $skin->link( $dp );
return "$from $edit $arr $to";
}
function formatResult( $skin, $result ) {
global $wgLang;
$title = Title::makeTitleSafe( $result->namespace, $result->title );
- if ( !$title instanceof Title ) { throw new MWException('Invalid title in database'); }
+
$count = wfMsgExt( 'ncategories', array( 'parsemag', 'escape' ), $wgLang->formatNum( $result->value ) );
- $link = $skin->makeKnownLinkObj( $title, $title->getText() );
+ $link = $skin->link( $title );
return wfSpecialList( $link, $count );
}
}
*/
public function formatResult( $skin, $result ) {
$title = Title::makeTitleSafe( $result->namespace, $result->title );
- if( $title instanceof Title ) {
- return wfSpecialList(
- $skin->makeLinkObj( $title ),
- $this->makeWlhLink( $title, $skin, $result )
- );
- } else {
- $tsafe = htmlspecialchars( $result->title );
- return "Invalid title in result set; {$tsafe}";
- }
+
+ $skin->link( $title );
+ return wfSpecialList(
+ $skin->makeLinkObj( $title ),
+ $this->makeWlhLink( $title, $skin, $result )
+ );
}
/**
global $wgLang;
$wlh = SpecialPage::getTitleFor( 'Whatlinkshere' );
$label = wfMsgExt( 'nlinks', array( 'parsemag', 'escape' ),
- $wgLang->formatNum( $result->value ) );
- return $skin->makeKnownLinkObj( $wlh, $label, 'target=' . $title->getPrefixedUrl() );
+ $wgLang->formatNum( $result->value ) );
+ return $skin->link( $wlh, $label, array(), array( 'target' => $title->getPrefixedText() ) );
}
}