if( $forceKnown ) {
$link = $sk->makeKnownLinkObj( $title, htmlspecialchars( $title->getFullText() ) );
} else {
- $link = $sk->makeLinkObj( $title, htmlspecialchars( $title->getFullText() ) );
+ $link = $sk->link( $title, htmlspecialchars( $title->getFullText() ) );
}
// automatically append redirect=no to each link, since most of them are redirect pages themselves
foreach( $target as $rt ) {
. $sk->makeKnownLinkObj( $rt, htmlspecialchars( $rt->getFullText() ) );
} else {
$link .= '<img src="'.$imageUrl2.'" alt="'.$alt2.' " />'
- . $sk->makeLinkObj( $rt, htmlspecialchars( $rt->getFullText() ) );
+ . $sk->link( $rt, htmlspecialchars( $rt->getFullText() ) );
}
}
return '<img src="'.$imageUrl.'" alt="#REDIRECT " />' .
$prevLink = wfMsgExt( 'prevn', array( 'escape', 'parsemag' ), $limitText );
if( $first != '' ) {
- $prevLink = $sk->makeLinkObj( $title, $prevLink,
- wfArrayToCGI( $query + array( 'until' => $first ) ) );
+ query[] = array( 'until' => $first );
+ $prevLink = $sk->link(
+ $title,
+ $prevLink,
+ array(),
+ $query
+ );
}
$nextLink = wfMsgExt( 'nextn', array( 'escape', 'parsemag' ), $limitText );
if( $last != '' ) {
- $nextLink = $sk->makeLinkObj( $title, $nextLink,
- wfArrayToCGI( $query + array( 'from' => $last ) ) );
+ query[] = array( 'from' => $last );
+ $nextLink = $sk->link(
+ $title,
+ $nextLink,
+ array(),
+ $query
+ );
}
return "($prevLink) ($nextLink)";
}
switch( $type ) {
case 'move':
- $titleLink = $skin->makeLinkObj( $title,
- htmlspecialchars( $title->getPrefixedText() ), 'redirect=no' );
+ $titleLink = $skin->link(
+ $title,
+ htmlspecialchars( $title->getPrefixedText() ),
+ array(),
+ array( 'redirect' => 'no' )
+ );
$targetTitle = Title::newFromText( $params[0] );
if ( !$targetTitle ) {
# Workaround for broken database
$params[0] = htmlspecialchars( $params[0] );
} else {
- $params[0] = $skin->makeLinkObj( $targetTitle, htmlspecialchars( $params[0] ) );
+ $params[0] = $skin->link(
+ $targetTitle,
+ htmlspecialchars( $params[0] )
+ );
}
break;
case 'block':
break;
case 'rights':
$text = $wgContLang->ucfirst( $title->getText() );
- $titleLink = $skin->makeLinkObj( Title::makeTitle( NS_USER, $text ) );
+ $titleLink = $skin->link( Title::makeTitle( NS_USER, $text ) );
break;
case 'merge':
- $titleLink = $skin->makeLinkObj( $title, $title->getPrefixedText(), 'redirect=no' );
- $params[0] = $skin->makeLinkObj( Title::newFromText( $params[0] ), htmlspecialchars( $params[0] ) );
+ $titleLink = $skin->link(
+ $title,
+ $title->getPrefixedText(),
+ array(),
+ array( 'redirect' => 'no' )
+ );
+ $params[0] = $skin->link(
+ Title::newFromText( $params[0] ),
+ htmlspecialchars( $params[0] )
+ );
$params[1] = $wgLang->timeanddate( $params[1] );
break;
default:
list( $name, $par ) = SpecialPage::resolveAliasWithSubpage( $title->getDBKey() );
# Use the language name for log titles, rather than Log/X
if( $name == 'Log' ) {
- $titleLink = '('.$skin->makeLinkObj( $title, LogPage::logName( $par ) ).')';
+ $titleLink = '('.$skin->link( $title, LogPage::logName( $par ) ).')';
} else {
- $titleLink = $skin->makeLinkObj( $title );
+ $titleLink = $skin->link( $title );
}
} else {
- $titleLink = $skin->makeLinkObj( $title );
+ $titleLink = $skin->link( $title );
}
}
return $titleLink;
if ( array_key_exists( $category, $categories ) )
continue;
$text = $wgContLang->convertHtml( $title->getText() );
- $this->mCategoryLinks[$type][] = $sk->makeLinkObj( $title, $text );
+ $this->mCategoryLinks[$type][] = $sk->link( $title, $text );
}
}
}
public function addReturnTo( $title ) {
global $wgUser;
$this->addLink( array( 'rel' => 'next', 'href' => $title->getFullUrl() ) );
- $link = wfMsg( 'returnto', $wgUser->getSkin()->makeLinkObj( $title ) );
+ $link = wfMsg( 'returnto', $wgUser->getSkin()->link( $title ) );
$this->addHTML( "<p>{$link}</p>\n" );
}
list( $cur, /* $prev */, $auto ) = $params;
if( is_object( $skin ) ) {
# Standard link to the page in question
- $link = $skin->makeLinkObj( $title );
+ $link = $skin->link( $title );
if( $title->exists() ) {
# Generate a diff link
$bits[] = 'oldid=' . urlencode( $cur );
global $wgAllowUserCss, $wgAllowUserJs;
if( $wgAllowUserCss ) {
$cssPage = Title::makeTitleSafe( NS_USER, $user->getName().'/'.$skinkey.'.css' );
- $customCSS = $sk->makeLinkObj( $cssPage, wfMsgExt('prefs-custom-css', array() ) );
+ $customCSS = $sk->link( $cssPage, wfMsgExt( 'prefs-custom-css', array() ) );
$extraLinks .= " ($customCSS)";
}
if( $wgAllowUserJs ) {
$jsPage = Title::makeTitleSafe( NS_USER, $user->getName().'/'.$skinkey.'.js' );
- $customJS = $sk->makeLinkObj( $jsPage, wfMsgHtml('prefs-custom-js') );
+ $customJS = $sk->link( $jsPage, wfMsgHtml( 'prefs-custom-js' ) );
$extraLinks .= " ($customJS)";
}
if( $skinkey == $wgDefaultSkin )
}
$sk = $wgUser->getSkin();
- $titleLink = $sk->makeLinkObj( $this->mTitle );
+ $titleLink = $sk->link( $this->mTitle );
$wgOut->setPageTitle( wfMsg( 'protect-title', $this->mTitle->getPrefixedText() ) );
$wgOut->setSubtitle( wfMsg( 'protect-backlink', $titleLink ) );
if( $title instanceof Title ) {
if( $this->isCached() ) {
$pageLink = $title->exists()
- ? '<s>' . $skin->makeLinkObj( $title ) . '</s>'
+ ? '<s>' . $skin->link( $title ) . '</s>'
: $skin->makeBrokenLinkObj( $title );
} else {
$pageLink = $skin->makeBrokenLinkObj( $title );
if( $title ) {
global $wgUser;
$sk = $wgUser->getSkin();
- return $sk->makeLinkObj( $title, htmlspecialchars( $text ) );
+ return $sk->link( $title, htmlspecialchars( $text ) );
} else {
return $text;
}
if( !$title instanceof Title )
$title = Title::newFromText( $title );
if( $title instanceof Title ) {
- $output->addHTML( "<li>" . $skin->makeLinkObj( $title )
- . ' (' . $skin->makeLinkObj( $title->getTalkPage(), $talk ) . ")</li>\n" );
+ $output->addHTML( "<li>" . $skin->link( $title )
+ . ' (' . $skin->link( $title->getTalkPage(), $talk ) . ")</li>\n" );
}
}
$output->addHTML( "</ul>\n" );
private function buildRemoveLine( $title, $redirect, $skin ) {
global $wgLang;
- $link = $skin->makeLinkObj( $title );
+ $link = $skin->link( $title );
if( $redirect )
$link = '<span class="watchlistredir">' . $link . '</span>';
- $tools[] = $skin->makeLinkObj( $title->getTalkPage(), wfMsgHtml( 'talkpagelinktext' ) );
+ $tools[] = $skin->link( $title->getTalkPage(), wfMsgHtml( 'talkpagelinktext' ) );
if( $title->exists() ) {
$tools[] = $skin->makeKnownLinkObj( $title, wfMsgHtml( 'history_short' ), 'action=history' );
}
// $toObj may very easily be false if the $result list is cached
if ( !is_object( $toObj ) ) {
- return '<s>' . $skin->makeLinkObj( $fromObj ) . '</s>';
+ return '<s>' . $skin->link( $fromObj ) . '</s>';
}
$from = $skin->makeKnownLinkObj( $fromObj ,'', 'redirect=no' );
function formatRow($result) {
global $wgLang;
$title = Title::makeTitle( NS_CATEGORY, $result->cat_title );
- $titleText = $this->getSkin()->makeLinkObj( $title, htmlspecialchars( $title->getText() ) );
+ $titleText = $this->getSkin()->link( $title, htmlspecialchars( $title->getText() ) );
$count = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
$wgLang->formatNum( $result->cat_pages ) );
return Xml::tags('li', null, "$titleText ($count)" ) . "\n";
if( 0 == $id ) {
$user = $nt->getText();
} else {
- $user = $sk->makeLinkObj( $nt, htmlspecialchars( $nt->getText() ) );
+ $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) );
}
$talk = $nt->getTalkPage();
if( $talk ) {
# Talk page link
- $tools[] = $sk->makeLinkObj( $talk, wfMsgHtml( 'sp-contributions-talk' ) );
+ $tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) );
if( ( $id != 0 && $wgSysopUserBans ) || ( $id == 0 && IP::isIPAddress( $nt->getText() ) ) ) {
# Block link
if( $wgUser->isAllowed( 'block' ) )
$page = Title::newFromRow( $row );
$page->resetArticleId( $row->rev_page ); // use process cache
- $link = $sk->makeLinkObj( $page, $page->getPrefixedText(), $page->isRedirect() ? 'redirect=no' : '' );
+ $link = $sk->link(
+ $page,
+ $page->getPrefixedText(),
+ array(),
+ $page->isRedirect() ? array( 'redirect' => 'no' ) : array()
+ );
# Mark current revisions
$difftext = $topmarktext = '';
if( $row->rev_id == $row->page_latest ) {
'×tamp=' . $rev->getTimestamp() );
}
- $pagelink = $sk->makeLinkObj( $page );
+ $pagelink = $sk->link( $page );
if( $rev->isMinor() ) {
$mflag = '<span class="minor">' . $this->messages['minoreditletter'] . '</span> ';
if ( 0 == $id ) {
$user = $nt->getText();
} else {
- $user = $sk->makeLinkObj( $nt, htmlspecialchars( $nt->getText() ) );
+ $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) );
}
$talk = $nt->getTalkPage();
if( $talk ) {
# Talk page link
- $tools[] = $sk->makeLinkObj( $talk, wfMsgHtml( 'talkpagelinktext' ) );
+ $tools[] = $sk->link( $talk, wfMsgHtml( 'talkpagelinktext' ) );
if( ( $id != 0 && $wgSysopUserBans ) || ( $id == 0 && User::isIP( $nt->getText() ) ) ) {
# Block link
if( $wgUser->isAllowed( 'block' ) )
}
}
if ( !$result ) {
- return '<s>' . $skin->makeLinkObj( $titleA, '', 'redirect=no' ) . '</s>';
+ return '<s>' . $skin->link( $titleA, null, array(), array( 'redirect' => 'no' ) ) . '</s>';
}
$titleB = Title::makeTitle( $result->nsb, $result->tb );
$text = $wgContLang->convert( $nt->getText() );
$plink = $skin->makeLink( $nt->getPrefixedText(), $text );
- $user = $skin->makeLinkObj( Title::makeTitle( NS_USER, $result->img_user_text ), $result->img_user_text );
+ $user = $skin->link( Title::makeTitle( NS_USER, $result->img_user_text ), $result->img_user_text );
$time = $wgLang->timeanddate( $result->img_timestamp );
return "$plink . . $user . . $time";
return "$link ($download)";
case 'img_user_text':
if ( $this->mCurrentRow->img_user ) {
- $link = $this->getSkin()->makeLinkObj( Title::makeTitle( NS_USER, $value ),
- htmlspecialchars( $value ) );
+ $link = $this->getSkin()->link(
+ Title::makeTitle( NS_USER, $value ),
+ htmlspecialchars( $value )
+ );
} else {
$link = htmlspecialchars( $value );
}
# Make a link to the redirect itself
$rd_title = Title::makeTitle( $result->namespace, $result->title );
- $rd_link = $skin->makeLinkObj( $rd_title, '', 'redirect=no' );
+ $rd_link = $skin->link(
+ $rd_title,
+ null,
+ array(),
+ array( 'redirect' => 'no' )
+ );
# Find out where the redirect leads
$revision = Revision::newFromTitle( $rd_title );
$target = Title::newFromRedirect( $revision->getText() );
if( $target ) {
$arr = $wgContLang->getArrow() . $wgContLang->getDirMark();
- $targetLink = $skin->makeLinkObj( $target );
+ $targetLink = $skin->link( $target );
return "$rd_link $arr $targetLink";
} else {
return "<s>$rd_link</s>";
global $wgLang;
$userPage = Title::makeTitle( NS_USER, $row->user_name );
- $name = $this->getSkin()->makeLinkObj( $userPage, htmlspecialchars( $userPage->getText() ) );
+ $name = $this->getSkin()->link( $userPage, htmlspecialchars( $userPage->getText() ) );
if( $row->numgroups > 1 || ( $this->requestedGroup && $row->numgroups == 1 ) ) {
$list = array();
$wgLang->formatNum( $result->img_size ) );
$dimensions = wfMsgHtml( 'widthheight', $wgLang->formatNum( $result->img_width ),
$wgLang->formatNum( $result->img_height ) );
- $user = $skin->makeLinkObj( Title::makeTitle( NS_USER, $result->img_user_text ), $result->img_user_text );
+ $user = $skin->link( Title::makeTitle( NS_USER, $result->img_user_text ), $result->img_user_text );
$time = $wgLang->timeanddate( $result->img_timestamp );
return "($download) $plink . . $dimensions . . $bytes . . $user . . $time";
function formatResult( $skin, $result ) {
global $wgLang;
$title = Title::makeTitleSafe( $result->namespace, $result->title );
- $link = $skin->makeLinkObj( $title );
+ $link = $skin->link( $title );
$wlh = $this->makeWlhLink( $title,
wfMsgExt( 'nlinks', array( 'parsemag', 'escape'),
$wgLang->formatNum( $result->value ) ), $skin );
$nt = Title::makeTitle( $result->namespace, $result->title );
$text = $wgContLang->convert( $nt->getText() );
- $plink = $skin->makeLinkObj( $nt, htmlspecialchars( $text ) );
+ $plink = $skin->link( $nt, htmlspecialchars( $text ) );
$nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),
$wgLang->formatNum( $result->value ) );
$skin->link( $title );
return wfSpecialList(
- $skin->makeLinkObj( $title ),
+ $skin->link( $title ),
$this->makeWlhLink( $title, $skin, $result )
);
}
$skin = $wgUser->getSkin();
- $oldTitleLink = $skin->makeLinkObj( $this->oldTitle );
+ $oldTitleLink = $skin->link( $this->oldTitle );
$wgOut->setPagetitle( wfMsg( 'move-page', $this->oldTitle->getPrefixedText() ) );
$wgOut->setSubtitle( wfMsg( 'move-page-backlink', $oldTitleLink ) );
$extraOutput []= wfMsgHtml( 'movepage-page-moved', $oldLink, $newLink );
} else {
$oldLink = $skin->makeKnownLinkObj( $oldSubpage );
- $newLink = $skin->makeLinkObj( $newSubpage );
+ $newLink = $skin->link( $newSubpage );
$extraOutput []= wfMsgHtml( 'movepage-page-unmoved', $oldLink, $newLink );
}
}
$ut = $s->img_user_text;
$nt = Title::newFromText( $name, NS_FILE );
- $ul = $sk->makeLinkObj( Title::makeTitle( NS_USER, $ut ), $ut );
+ $ul = $sk->link( Title::makeTitle( NS_USER, $ut ), $ut );
$gallery->add( $nt, "$ul<br />\n<i>".$wgLang->timeanddate( $s->img_timestamp, true )."</i><br />\n" );
$skin = $wgUser->getSkin();
$title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
- $link = $skin->makeLinkObj( $title );
+ $link = $skin->link( $title );
$description_items = array ();
$skin = $wgUser->getSkin();
$title = Title::makeTitleSafe( $row->pt_namespace, $row->pt_title );
- $link = $skin->makeLinkObj( $title );
+ $link = $skin->link( $title );
$description_items = array ();
}
$hlink = $skin->makeKnownLinkObj( $title, wfMsgHtml( 'hist' ), 'action=history' );
$plink = $this->isCached()
- ? $skin->makeLinkObj( $title )
+ ? $skin->link( $title )
: $skin->makeKnownLinkObj( $title );
$size = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), $wgLang->formatNum( htmlspecialchars( $result->value ) ) );
if( $isDeleted ) {
/// @fixme $rev->getTitle() is null for deleted revs...?
$targetPage = SpecialPage::getTitleFor( 'Undelete' );
- $targetQuery = 'target=' .
- $this->mTargetObj->getPrefixedUrl() .
- '×tamp=' .
- wfTimestamp( TS_MW, $rev->getTimestamp() );
+ $targetQuery = array(
+ 'target' => $this->mTargetObj->getPrefixedUrl(),
+ 'timestamp' => wfTimestamp( TS_MW, $rev->getTimestamp() )
+ );
} else {
/// @fixme getId() may return non-zero for deleted revs...
$targetPage = $rev->getTitle();
- $targetQuery = 'oldid=' . $rev->getId();
+ $targetQuery = array( 'oldid' => $rev->getId() );
}
// Add show/hide link if available
if( $wgUser->isAllowed( 'deleterevision' ) ) {
}
return
'<div id="mw-diff-'.$prefix.'title1"><strong>' .
- $sk->makeLinkObj( $targetPage,
- wfMsgHtml( 'revisionasof',
- $wgLang->timeanddate( $rev->getTimestamp(), true ) ),
- $targetQuery ) .
+ $sk->link(
+ $targetPage,
+ wfMsgHtml(
+ 'revisionasof',
+ $wgLang->timeanddate( $rev->getTimestamp(), true )
+ ),
+ array(),
+ $targetQuery
+ ) .
( $isDeleted ? ' ' . wfMsgHtml( 'deletedrev' ) : '' ) .
'</strong></div>' .
'<div id="mw-diff-'.$prefix.'title2">' .
function formatResult( $skin, $result ) {
$title = Title::makeTitle( NS_CATEGORY, $result->title );
- return $skin->makeLinkObj( $title, $title->getText() );
+ return $skin->link( $title, $title->getText() );
}
}
$text = $wgContLang->convert( $nt->getText() );
$plink = $this->isCached() ?
- $skin->makeLinkObj( $nt, htmlspecialchars( $text ) ) :
+ $skin->link( $nt, htmlspecialchars( $text ) ) :
$skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) );
$nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),