* use array type parameter instead of string to escapeLocalUrl(), getFullURL() and getFullUrl() for readability
// This is an internally redirected page view.
// We'll need a backlink to the source page for navigation.
if( wfRunHooks( 'ArticleViewRedirect', array( &$this ) ) ) {
- $redir = $sk->makeKnownLinkObj( $this->mRedirectedFrom, '', 'redirect=no' );
+ $redir = $sk->link(
+ $this->mRedirectedFrom,
+ null,
+ array(),
+ array( 'redirect' => 'no' ),
+ array( 'known', 'noclasses' )
+ );
$s = wfMsgExt( 'redirectedfrom', array( 'parseinline', 'replaceafter' ), $redir );
$wgOut->setSubtitle( $s );
# If we have been passed an &rcid= parameter, we want to give the user a
# chance to mark this new article as patrolled.
- if( !empty($rcid) && $this->mTitle->exists() && $this->mTitle->quickUserCan('patrol') ) {
+ if( !empty( $rcid ) && $this->mTitle->exists() && $this->mTitle->quickUserCan( 'patrol' ) ) {
$wgOut->addHTML(
"<div class='patrollink'>" .
- wfMsgHtml( 'markaspatrolledlink',
- $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml('markaspatrolledtext'),
- "action=markpatrolled&rcid=$rcid" )
- ) .
+ wfMsgHtml(
+ 'markaspatrolledlink',
+ $sk->link(
+ $this->mTitle,
+ wfMsgHtml( 'markaspatrolledtext' ),
+ array(),
+ array(
+ 'action' => 'markpatrolled',
+ 'rcid' => $rcid
+ ),
+ array( 'known', 'noclasses' )
+ )
+ ) .
'</div>'
- );
+ );
}
# Trackbacks
// the loop prepends the arrow image before the link, so the first case needs to be outside
$title = array_shift( $target );
if( $forceKnown ) {
- $link = $sk->makeKnownLinkObj( $title, htmlspecialchars( $title->getFullText() ) );
+ $link = $sk->link(
+ $title,
+ htmlspecialchars( $title->getFullText() ),
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ );
} else {
$link = $sk->link( $title, htmlspecialchars( $title->getFullText() ) );
}
foreach( $target as $rt ) {
if( $forceKnown ) {
$link .= '<img src="'.$imageUrl2.'" alt="'.$alt2.' " />'
- . $sk->makeKnownLinkObj( $rt, htmlspecialchars( $rt->getFullText() ) );
+ . $sk->link(
+ $rt,
+ htmlspecialchars( $rt->getFullText() ),
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ );
} else {
$link .= '<img src="'.$imageUrl2.'" alt="'.$alt2.' " />'
. $sk->link( $rt, htmlspecialchars( $rt->getFullText() ) );
wfDebug( "Article::confirmDelete\n" );
- $wgOut->setSubtitle( wfMsgHtml( 'delete-backlink', $wgUser->getSkin()->makeKnownLinkObj( $this->mTitle ) ) );
+ $deleteBackLink = $wgUser->getSkin()->link(
+ $this->mTitle,
+ null,
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ );
+ $wgOut->setSubtitle( wfMsgHtml( 'delete-backlink', $deleteBackLink ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->addWikiMsg( 'confirmdeletetext' );
$sk = $wgUser->getSkin();
$lnk = $current
? wfMsgHtml( 'currentrevisionlink' )
- : $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'currentrevisionlink' ) );
+ : $sk->link(
+ $this->mTitle,
+ wfMsgHtml( 'currentrevisionlink' ),
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ );
$curdiff = $current
? wfMsgHtml( 'diff' )
- : $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'diff' ), 'diff=cur&oldid='.$oldid );
+ : $sk->link(
+ $this->mTitle,
+ wfMsgHtml( 'diff' ),
+ array(),
+ array(
+ 'diff' => 'cur',
+ 'oldid' => $oldid
+ ),
+ array( 'known', 'noclasses' )
+ );
$prev = $this->mTitle->getPreviousRevisionID( $oldid ) ;
$prevlink = $prev
- ? $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'previousrevision' ), 'direction=prev&oldid='.$oldid )
+ ? $sk->link(
+ $this->mTitle,
+ wfMsgHtml( 'previousrevision' ),
+ array(),
+ array(
+ 'direction' => 'prev',
+ 'oldid' => $oldid
+ ),
+ array( 'known', 'noclasses' )
+ )
: wfMsgHtml( 'previousrevision' );
$prevdiff = $prev
- ? $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'diff' ), 'diff=prev&oldid='.$oldid )
+ ? $sk->link(
+ $this->mTitle,
+ wfMsgHtml( 'diff' ),
+ array(),
+ array(
+ 'diff' => 'prev',
+ 'oldid' => $oldid
+ ),
+ array( 'known', 'noclasses' )
+ )
: wfMsgHtml( 'diff' );
$nextlink = $current
? wfMsgHtml( 'nextrevision' )
- : $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'nextrevision' ), 'direction=next&oldid='.$oldid );
+ : $sk->link(
+ $this->mTitle,
+ wfMsgHtml( 'nextrevision' ),
+ array(),
+ array(
+ 'direction' => 'next',
+ 'oldid' => $oldid
+ ),
+ array( 'known', 'noclasses' )
+ );
$nextdiff = $current
? wfMsgHtml( 'diff' )
- : $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'diff' ), 'diff=next&oldid='.$oldid );
+ : $sk->link(
+ $this->mTitle,
+ wfMsgHtml( 'diff' ),
+ array(),
+ array(
+ 'diff' => 'next',
+ 'oldid' => $oldid
+ ),
+ array( 'known', 'noclasses' )
+ );
$cdel='';
if( $wgUser->isAllowed( 'deleterevision' ) ) {
// If revision was hidden from sysops
$cdel = wfMsgHtml( 'rev-delundel' );
} else {
- $cdel = $sk->makeKnownLinkObj( $revdel,
+ $cdel = $sk->link(
+ $revdel,
wfMsgHtml('rev-delundel'),
- 'type=revision' .
- '&target=' . urlencode( $this->mTitle->getPrefixedDbkey() ) .
- '&ids=' . urlencode( $oldid ) );
+ array(),
+ array(
+ 'type' => 'revision',
+ 'target' => urlencode( $this->mTitle->getPrefixedDbkey() ),
+ 'ids' => urlencode( $oldid )
+ ),
+ array( 'known', 'noclasses' )
+ );
// Bolden oversighted content
if( $revision->isDeleted( Revision::DELETED_RESTRICTED ) )
$cdel = "<strong>$cdel</strong>";
function addSubcategory( $title, $sortkey, $pageLength ) {
global $wgContLang;
// Subcategory; strip the 'Category' namespace from the link text.
- $this->children[] = $this->getSkin()->makeKnownLinkObj(
- $title, $wgContLang->convertHtml( $title->getText() ) );
+ $this->children[] = $this->getSkin()->link(
+ $title,
+ $wgContLang->convertHtml( $title->getText() ).
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ );
$this->children_start_char[] = $this->getSubcategorySortChar( $title, $sortkey );
}
global $wgContLang;
$titletext = $wgContLang->convertHtml( $title->getPrefixedText() );
$this->articles[] = $isRedirect
- ? '<span class="redirect-in-category">' . $this->getSkin()->makeKnownLinkObj( $title, $titletext ) . '</span>'
+ ? '<span class="redirect-in-category">' .
+ $this->getSkin()->link(
+ $title,
+ $titletext,
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ ) . '</span>'
: $this->getSkin()->makeSizeLinkObj( $pageLength, $title, $titletext );
$this->articles_start_char[] = $wgContLang->convert( $wgContLang->firstChar( $sortkey ) );
}
# Diff
$s .= '(' . $this->message['diff'] . ') (';
# Hist
- $s .= $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), $this->message['hist'],
- 'action=history' ) . ') . . ';
+ $s .= $this->skin->link(
+ $rc->getMovedToTitle(),
+ $this->message['hist'],
+ array(),
+ array( 'action' => 'history' ),
+ array( 'known', 'noclasses' )
+ ) . ') . . ';
# "[[x]] moved to [[y]]"
$msg = ( $rc->mAttribs['rc_type'] == RC_MOVE ) ? '1movedto2' : '1movedto2_redir';
- $s .= wfMsg( $msg, $this->skin->makeKnownLinkObj( $rc->getTitle(), '', 'redirect=no' ),
- $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), '' ) );
+ $s .= wfMsg(
+ $msg,
+ $this->skin->link(
+ $rc->getTitle(),
+ null,
+ array(),
+ array( 'redirect' => 'no' ),
+ array( 'known', 'noclasses' )
+ ),
+ $this->skin->link(
+ $rc->getMovedToTitle(),
+ null,
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ )
+ );
}
protected function insertDateHeader( &$s, $rc_timestamp ) {
protected function insertLog( &$s, $title, $logtype ) {
$logname = LogPage::logName( $logtype );
- $s .= '(' . $this->skin->makeKnownLinkObj($title, $logname ) . ')';
+ $s .= '(' . $this->skin->link(
+ $title,
+ $logname,
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ ) . ')';
}
protected function insertDiffHist( &$s, &$rc, $unpatrolled ) {
} else if( !$this->userCan($rc,Revision::DELETED_TEXT) ) {
$diffLink = $this->message['diff'];
} else {
- $rcidparam = $unpatrolled ? array( 'rcid' => $rc->mAttribs['rc_id'] ) : array();
- $diffLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $this->message['diff'],
- wfArrayToCGI( array(
- 'curid' => $rc->mAttribs['rc_cur_id'],
- 'diff' => $rc->mAttribs['rc_this_oldid'],
- 'oldid' => $rc->mAttribs['rc_last_oldid'] ),
- $rcidparam ),
- '', '', ' tabindex="'.$rc->counter.'"');
+ $query = array(
+ 'curid' => $rc->mAttribs['rc_cur_id'],
+ 'diff' => $rc->mAttribs['rc_this_oldid'],
+ 'oldid' => $rc->mAttribs['rc_last_oldid']
+ );
+
+ if( $unpatrolled ) {
+ $query['rcid'] = $rc->mAttribs['rc_id'];
+ };
+
+ $diffLink = $this->skin->link(
+ $rc->getTitle(),
+ $this->message['diff'],
+ array( 'tabindex' => $rc->counter ),
+ $query,
+ array( 'known', 'noclasses' )
+ );
}
$s .= '('.$diffLink.') (';
# History link
- $s .= $this->skin->makeKnownLinkObj( $rc->getTitle(), $this->message['hist'],
- wfArrayToCGI( array(
+ $s .= $this->skin->link(
+ $rc->getTitle(),
+ $this->message['hist'],
+ array(),
+ array(
'curid' => $rc->mAttribs['rc_cur_id'],
- 'action' => 'history' ) ) );
+ 'action' => 'history'
+ ),
+ array( 'known', 'noclasses' )
+ );
$s .= ') . . ';
}
global $wgContLang;
# If it's a new article, there is no diff link, but if it hasn't been
# patrolled yet, we need to give users a way to do so
- $params = ( $unpatrolled && $rc->mAttribs['rc_type'] == RC_NEW ) ?
- 'rcid='.$rc->mAttribs['rc_id'] : '';
+ $params = array();
+
+ if ( $unpatrolled && $rc->mAttribs['rc_type'] == RC_NEW ) {
+ $params['rcid'] = $rc->mAttribs['rc_id'];
+ }
+
if( $this->isDeleted($rc,Revision::DELETED_TEXT) ) {
- $articlelink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '', $params );
- $articlelink = '<span class="history-deleted">'.$articlelink.'</span>';
+ $articlelink = $this->skin->link(
+ $rc->getTitle(),
+ null,
+ array(),
+ $params,
+ array( 'known', 'noclasses' )
+ );
+ $articlelink = '<span class="history-deleted">' . $articlelink . '</span>';
} else {
- $articlelink = ' '. $this->skin->makeKnownLinkObj( $rc->getTitle(), '', $params );
+ $articlelink = ' '. $this->skin->link(
+ $rc->getTitle(),
+ null,
+ array(),
+ $params,
+ array( 'known', 'noclasses' )
+ );
}
# Bolden pages watched by this user
if( $watched ) {
}
}
- protected function maybeWatchedLink( $link, $watched=false ) {
+ protected function maybeWatchedLink( $link, $watched = false ) {
if( $watched ) {
return '<strong class="mw-watched">' . $link . '</strong>';
} else {
$rc->timestamp = $time;
$rc->numberofWatchingusers = $baseRC->numberofWatchingusers;
- # Make "cur" and "diff" links. Don't use link(), it's too slow if
+ # Make "cur" and "diff" links. Do not use link(), it is too slow if
# called too many times (50% of CPU time on RecentChanges!).
if( $rc->unpatrolled ) {
$rcIdQuery = array( 'rcid' => $rc_id );
# Make "last" link
if( !$showdifflinks || !$rc_last_oldid ) {
- $lastLink = $this->message['last'];
+ $lastLink = $this->message['last'];
} else if( $rc_type == RC_LOG || $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
$lastLink = $this->message['last'];
} else {
$r .= $wgContLang->getDirMark();
- $curIdEq = 'curid=' . $curId;
+ $queryParams['curid'] = $curId;
# Changes message
$n = count($block);
static $nchanges = array();
} else if( $isnew ) {
$r .= $nchanges[$n];
} else {
- $r .= $this->skin->makeKnownLinkObj( $block[0]->getTitle(),
- $nchanges[$n], $curIdEq."&diff=$currentRevision&oldid=$oldid" );
+ $params = $queryParams;
+ $params['diff'] = $currentRevision;
+ $params['oldid'] = $oldid;
+
+ $r .= $this->skin->link(
+ $block[0]->getTitle(),
+ $nchanges[$n],
+ array(),
+ $params,
+ array( 'known', 'noclasses' )
+ );
}
}
} else if( $namehidden || !$block[0]->getTitle()->exists() ) {
$r .= $this->message['semicolon-separator'] . $this->message['hist'] . ')';
} else {
- $r .= $this->message['semicolon-separator'] . $this->skin->makeKnownLinkObj( $block[0]->getTitle(),
- $this->message['hist'], $curIdEq . '&action=history' ) . ')';
+ $params = $queryParams;
+ $params['action'] = 'history';
+
+ $r .= $this->message['semicolon-separator'] .
+ $this->skin->link(
+ $block[0]->getTitle(),
+ $this->message['hist'],
+ array(),
+ $params,
+ array( 'known', 'noclasses' )
+ ) . ')';
}
$r .= ' . . ';
$r .= $this->recentChangesFlags( $rc_new, $rc_minor, $rcObj->unpatrolled, ' ', $rc_bot );
$r .= ' </tt></td><td valign="top">';
- $o = '';
+ $params = $queryParams;
+
if( $rc_this_oldid != 0 ) {
- $o = 'oldid='.$rc_this_oldid;
+ $params['oldid'] = $rc_this_oldid;
}
+
# Log timestamp
if( $rc_type == RC_LOG ) {
$link = '<tt>'.$rcObj->timestamp.'</tt> ';
} else if( !ChangesList::userCan($rcObj,Revision::DELETED_TEXT) ) {
$link = '<span class="history-deleted"><tt>'.$rcObj->timestamp.'</tt></span> ';
} else {
- $rcIdEq = ($rcObj->unpatrolled && $rc_type == RC_NEW) ?
- '&rcid='.$rcObj->mAttribs['rc_id'] : '';
- $link = '<tt>'.$this->skin->makeKnownLinkObj( $rcObj->getTitle(),
- $rcObj->timestamp, $curIdEq.'&'.$o.$rcIdEq ).'</tt>';
+ if ( $rcObj->unpatrolled && $rc_type == RC_NEW) {
+ $params['rcid'] = $rcObj->mAttribs['rc_id'];
+ }
+
+ $link = '<tt>' .
+ $this->skin->link(
+ $rcObj->getTitle(),
+ $rcObj->timestamp,
+ array(),
+ $params,
+ array( 'known', 'noclasses' )
+ ) . '</tt>';
if( $this->isDeleted($rcObj,Revision::DELETED_TEXT) )
$link = '<span class="history-deleted">'.$link.'</span> ';
}
// that explicitly initializes variables.
$classes = array(); // TODO implement
extract( $rcObj->mAttribs );
- $curIdEq = "curid={$rc_cur_id}";
+ $query['curid'] = $rc_cur_id;
$r = '<table cellspacing="0" cellpadding="0" border="0" style="background: none"><tr>';
$r .= '<td valign="top" style="white-space: nowrap"><tt>' . $this->spacerArrow() . ' ';
if( $rc_log_type ) {
$logtitle = Title::newFromText( "Log/$rc_log_type", NS_SPECIAL );
$logname = LogPage::logName( $rc_log_type );
- $r .= '(' . $this->skin->makeKnownLinkObj($logtitle, $logname ) . ')';
+ $r .= '(' . $this->skin->link(
+ $logtitle,
+ $logname,
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ ) . ')';
} else {
$this->insertArticleLink( $r, $rcObj, $rcObj->unpatrolled, $rcObj->watched );
}
# Diff and hist links
if ( $rc_type != RC_LOG ) {
$r .= ' ('. $rcObj->difflink . $this->message['semicolon-separator'];
- $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), $this->message['hist'],
- $curIdEq.'&action=history' ) . ')';
+ $query['action'] = 'history';
+ $r .= $this->skin->link(
+ $rcObj->getTitle(),
+ $this->message['hist'],
+ array(),
+ $query,
+ array( 'known', 'noclasses' )
+ ) . ')';
}
$r .= ' . . ';
# Character diff
$wgOut->addHTML( "</div>\n" );
}
- $q = 'action='.$this->action;
- #if ( "no" == $redirect ) { $q .= "&redirect=no"; }
- $action = $wgTitle->escapeLocalURL( $q );
+ $action = $wgTitle->escapeLocalURL( array( 'action' => $this->action ) );
$summary = wfMsgExt( 'summary', 'parseinline' );
$subject = wfMsgExt( 'subject', 'parseinline' );
- $cancel = $sk->makeKnownLink( $wgTitle->getPrefixedText(),
- wfMsgExt('cancel', array('parseinline')) );
+ $cancel = $sk->link(
+ $wgTitle->getPrefixedText(),
+ wfMsgExt( 'cancel', array( 'parseinline' ) ),
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ );
$separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
$edithelpurl = Skin::makeInternalOrExternalUrl( wfMsgForContent( 'edithelppage' ));
$edithelp = '<a target="helpwindow" href="'.$edithelpurl.'">'.
function doLivePreviewScript() {
global $wgOut, $wgTitle;
$wgOut->addScriptFile( 'preview.js' );
- $liveAction = $wgTitle->getLocalUrl( "action={$this->action}&wpPreview=true&live=true" );
+ $liveAction = $wgTitle->getLocalUrl( array(
+ 'action' => $this->action,
+ 'wpPreview' => 'true',
+ 'live' => 'true'
+ ) );
return "return !lpDoPreview(" .
"editform.wpTextbox1.value," .
'"' . $liveAction . '"' . ")";
$skin = $wgUser->getSkin();
$loginTitle = SpecialPage::getTitleFor( 'Userlogin' );
- $loginLink = $skin->makeKnownLinkObj( $loginTitle, wfMsgHtml( 'loginreqlink' ), 'returnto=' . $wgTitle->getPrefixedUrl() );
+ $loginLink = $skin->link(
+ $loginTitle,
+ wfMsgHtml( 'loginreqlink' ),
+ array(),
+ array( 'returnto' => $wgTitle->getPrefixedUrl() ),
+ array( 'known', 'noclasses' )
+ );
$wgOut->setPageTitle( wfMsg( 'whitelistedittitle' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
global $wgOut, $wgUser;
$wgOut->setPageTitle( wfMsg( 'filedelete', $this->title->getText() ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
- $wgOut->setSubtitle( wfMsg( 'filedelete-backlink', $wgUser->getSkin()->makeKnownLinkObj( $this->title ) ) );
+ $wgOut->setSubtitle( wfMsg(
+ 'filedelete-backlink',
+ $wgUser->getSkin()->link(
+ $this->title,
+ null,
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ )
+ ) );
}
/**
* @return string
*/
private function getAction() {
- $q = array();
- $q[] = 'action=delete';
+ $q['action'] = 'delete';
if( $this->oldimage )
- $q[] = 'oldimage=' . urlencode( $this->oldimage );
- return $this->title->getLocalUrl( implode( '&', $q ) );
+ $q['oldimage'] = $this->oldimage;
+ return $this->title->getLocalUrl( $q );
}
/**
private function getTimestamp() {
return $this->oldfile->getTimestamp();
}
-
}
global $wgOut, $wgUser;
$wgOut->setPageTitle( wfMsg( 'filerevert', $this->title->getText() ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
- $wgOut->setSubtitle( wfMsg( 'filerevert-backlink', $wgUser->getSkin()->makeKnownLinkObj( $this->title ) ) );
+ $wgOut->setSubtitle( wfMsg(
+ 'filerevert-backlink',
+ $wgUser->getSkin()->link(
+ $this->title,
+ null,
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ )
+ ) );
}
/**
if( $page > 1 ) {
$label = $wgOut->parse( wfMsg( 'imgmultipageprev' ), false );
- $link = $sk->makeKnownLinkObj( $this->mTitle, $label, 'page='. ($page-1) );
+ $link = $sk->link(
+ $this->mTitle,
+ $label,
+ array(),
+ array( 'page' => $page - 1 ),
+ array( 'known', 'noclasses' )
+ );
$thumb1 = $sk->makeThumbLinkObj( $this->mTitle, $this->displayImg, $link, $label, 'none',
array( 'page' => $page - 1 ) );
} else {
if( $page < $count ) {
$label = wfMsg( 'imgmultipagenext' );
- $link = $sk->makeKnownLinkObj( $this->mTitle, $label, 'page='. ($page+1) );
+ $link = $sk->link(
+ $this->mTitle,
+ $label,
+ array(),
+ array( 'page' => $page + 1 ),
+ array( 'known', 'noclasses' )
+ );
$thumb2 = $sk->makeThumbLinkObj( $this->mTitle, $this->displayImg, $link, $label, 'none',
array( 'page' => $page + 1 ) );
} else {
}
# External editing link
- $elink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'edit-externally' ), 'action=edit&externaledit=true&mode=file' );
+ $elink = $sk->link(
+ $this->mTitle,
+ wfMsgHtml( 'edit-externally' ),
+ array(),
+ array(
+ 'action' => 'edit',
+ 'externaledit' => 'true',
+ 'mode' => 'file'
+ ),
+ array( 'known', 'noclasses' )
+ );
$wgOut->addHTML( '<li id="mw-imagepage-edit-external">' . $elink . ' <small>' . wfMsgExt( 'edit-externally-help', array( 'parseinline' ) ) . "</small></li>\n" );
$wgOut->addHTML( "</ul>\n" );
$count++;
if( $count <= $limit ) {
// We have not yet reached the extra one that tells us there is more to fetch
- $name = Title::makeTitle( $s->page_namespace, $s->page_title );
- $link = $sk->makeKnownLinkObj( $name, "" );
+ $link = $sk->link(
+ Title::makeTitle( $s->page_namespace, $s->page_title ),
+ null,
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ );
$wgOut->addHTML( "<li>{$link}</li>\n" );
}
}
$sk = $wgUser->getSkin();
foreach ( $redirects as $title ) {
- $link = $sk->makeKnownLinkObj( $title, "", "redirect=no" );
+ $link = $sk->link(
+ $title,
+ null,
+ array(),
+ array( 'redirect' => 'no' ),
+ array( 'known', 'noclasses' )
+ );
$wgOut->addHTML( "<li>{$link}</li>\n" );
}
$wgOut->addHTML( "</ul></div>\n" );
$sk = $wgUser->getSkin();
foreach ( $dupes as $file ) {
$fromSrc = '';
- if( $file->isLocal() )
- $link = $sk->makeKnownLinkObj( $file->getTitle(), "" );
- else {
+ if( $file->isLocal() ) {
+ $link = $sk->link(
+ $file->getTitle(),
+ null,
+ array(),
+ array(),
+ array( 'known', 'noclasses' )
+ );
+ } else {
$link = $sk->makeExternalLink( $file->getDescriptionUrl(),
$file->getTitle()->getPrefixedText() );
$fromSrc = wfMsg( 'shared-repo-from', $file->getRepo()->getDisplayName() );
if( $file->isDeleted(File::DELETED_FILE) ) {
$row .= wfMsgHtml('filehist-revert');
} else {
- $q = array();
- $q[] = 'action=revert';
- $q[] = 'oldimage=' . urlencode( $img );
- $q[] = 'wpEditToken=' . urlencode( $wgUser->editToken( $img ) );
- $row .= $this->skin->makeKnownLinkObj( $this->title,
+ $row .= $this->skin->link(
+ $this->title,
wfMsgHtml( 'filehist-revert' ),
- implode( '&', $q ) );
+ array(),
+ array(
+ 'action' => 'revert',
+ 'oldimage' => $img,
+ 'wpEditToken' => $wgUser->editToken( $img )
+ ),
+ array( 'known', 'noclasses' )
+ );
}
}
$row .= '</td>';
} elseif( $file->isDeleted(File::DELETED_FILE) ) {
$revdel = SpecialPage::getTitleFor( 'Revisiondelete' );
# Make a link to review the image
- $url = $this->skin->makeKnownLinkObj( $revdel, $wgLang->timeAndDate( $timestamp, true ),
- "target=".$wgTitle->getPrefixedUrl().
- "&file=" . urlencode( $img ) .
- "&token=" . urlencode( $wgUser->editToken( $img ) ) );
+ $url = $this->skin->link(
+ $revdel,
+ $wgLang->timeAndDate( $timestamp, true ),
+ array(),
+ array(
+ 'target' => $wgTitle->getPrefixedUrl(),
+ 'file' => $img,
+ 'token' => $wgUser->editToken( $img )
+ ),
+ array( 'known', 'noclasses' )
+ );
$row .= '<span class="history-deleted">'.$url.'</span>';
} elseif( $file->isMissing() ) {
# Don't link to missing files