From: Siebrand Mazeland Date: Fri, 8 May 2009 23:24:31 +0000 (+0000) Subject: Use link() instead of deprecated makeLinkObj() where possible. X-Git-Tag: 1.31.0-rc.0~41840 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=547858b7fea2c17bea82ea6e48efd7305498f40e;p=lhc%2Fweb%2Fwiklou.git Use link() instead of deprecated makeLinkObj() where possible. --- diff --git a/includes/Article.php b/includes/Article.php index f10eafd4b2..02c233c994 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1127,7 +1127,7 @@ class Article { 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 ) { @@ -1136,7 +1136,7 @@ class Article { . $sk->makeKnownLinkObj( $rt, htmlspecialchars( $rt->getFullText() ) ); } else { $link .= ''.$alt2.' ' - . $sk->makeLinkObj( $rt, htmlspecialchars( $rt->getFullText() ) ); + . $sk->link( $rt, htmlspecialchars( $rt->getFullText() ) ); } } return '#REDIRECT ' . diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 4d31773992..5ba858f972 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -452,13 +452,23 @@ class CategoryViewer { $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)"; diff --git a/includes/LogPage.php b/includes/LogPage.php index 9faff8187a..39869cb504 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -281,14 +281,21 @@ class LogPage { } 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': @@ -304,11 +311,19 @@ class LogPage { 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: @@ -316,12 +331,12 @@ class LogPage { 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; diff --git a/includes/OutputPage.php b/includes/OutputPage.php index ab2b436480..72940cc7a9 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -458,7 +458,7 @@ class OutputPage { 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 ); } } } @@ -1444,7 +1444,7 @@ class OutputPage { 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( "

{$link}

\n" ); } diff --git a/includes/PatrolLog.php b/includes/PatrolLog.php index 978821c1a1..61512ded5b 100644 --- a/includes/PatrolLog.php +++ b/includes/PatrolLog.php @@ -42,7 +42,7 @@ class PatrolLog { 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 ); diff --git a/includes/Preferences.php b/includes/Preferences.php index 652ac089aa..7bb8200190 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -899,12 +899,12 @@ class Preferences { 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 ) diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 102c297697..b93c840f44 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -196,7 +196,7 @@ class ProtectionForm { } $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 ) ); diff --git a/includes/QueryPage.php b/includes/QueryPage.php index 6d26b5fbd2..671fd5c41f 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -577,7 +577,7 @@ abstract class WantedQueryPage extends QueryPage { if( $title instanceof Title ) { if( $this->isCached() ) { $pageLink = $title->exists() - ? '' . $skin->makeLinkObj( $title ) . '' + ? '' . $skin->link( $title ) . '' : $skin->makeBrokenLinkObj( $title ); } else { $pageLink = $skin->makeBrokenLinkObj( $title ); diff --git a/includes/User.php b/includes/User.php index 4ab5785578..d10bc34c43 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3205,7 +3205,7 @@ class User { if( $title ) { global $wgUser; $sk = $wgUser->getSkin(); - return $sk->makeLinkObj( $title, htmlspecialchars( $text ) ); + return $sk->link( $title, htmlspecialchars( $text ) ); } else { return $text; } diff --git a/includes/WatchlistEditor.php b/includes/WatchlistEditor.php index 82f62f6aaa..9744aab93f 100644 --- a/includes/WatchlistEditor.php +++ b/includes/WatchlistEditor.php @@ -143,8 +143,8 @@ class WatchlistEditor { if( !$title instanceof Title ) $title = Title::newFromText( $title ); if( $title instanceof Title ) { - $output->addHTML( "
  • " . $skin->makeLinkObj( $title ) - . ' (' . $skin->makeLinkObj( $title->getTalkPage(), $talk ) . ")
  • \n" ); + $output->addHTML( "
  • " . $skin->link( $title ) + . ' (' . $skin->link( $title->getTalkPage(), $talk ) . ")
  • \n" ); } } $output->addHTML( "\n" ); @@ -409,10 +409,10 @@ class WatchlistEditor { private function buildRemoveLine( $title, $redirect, $skin ) { global $wgLang; - $link = $skin->makeLinkObj( $title ); + $link = $skin->link( $title ); if( $redirect ) $link = '' . $link . ''; - $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' ); } diff --git a/includes/specials/SpecialBrokenRedirects.php b/includes/specials/SpecialBrokenRedirects.php index 0a16e6de32..de33abccae 100644 --- a/includes/specials/SpecialBrokenRedirects.php +++ b/includes/specials/SpecialBrokenRedirects.php @@ -61,7 +61,7 @@ class BrokenRedirectsPage extends PageQueryPage { // $toObj may very easily be false if the $result list is cached if ( !is_object( $toObj ) ) { - return '' . $skin->makeLinkObj( $fromObj ) . ''; + return '' . $skin->link( $fromObj ) . ''; } $from = $skin->makeKnownLinkObj( $fromObj ,'', 'redirect=no' ); diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php index eefe8e1665..fca0538802 100644 --- a/includes/specials/SpecialCategories.php +++ b/includes/specials/SpecialCategories.php @@ -90,7 +90,7 @@ class CategoryPager extends AlphabeticPager { 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"; diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index a4037cb7f0..62ec9c205a 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -148,12 +148,12 @@ class SpecialContributions extends SpecialPage { 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' ) ) @@ -482,7 +482,12 @@ class ContribsPager extends ReverseChronologicalPager { $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 ) { diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 97517362c8..d5dc37171a 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -155,7 +155,7 @@ class DeletedContribsPager extends IndexPager { '×tamp=' . $rev->getTimestamp() ); } - $pagelink = $sk->makeLinkObj( $page ); + $pagelink = $sk->link( $page ); if( $rev->isMinor() ) { $mflag = '' . $this->messages['minoreditletter'] . ' '; @@ -304,12 +304,12 @@ class DeletedContributionsPage extends SpecialPage { 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' ) ) diff --git a/includes/specials/SpecialDoubleRedirects.php b/includes/specials/SpecialDoubleRedirects.php index b1bad0c311..d97f4b4896 100644 --- a/includes/specials/SpecialDoubleRedirects.php +++ b/includes/specials/SpecialDoubleRedirects.php @@ -74,7 +74,7 @@ class DoubleRedirectsPage extends PageQueryPage { } } if ( !$result ) { - return '' . $skin->makeLinkObj( $titleA, '', 'redirect=no' ) . ''; + return '' . $skin->link( $titleA, null, array(), array( 'redirect' => 'no' ) ) . ''; } $titleB = Title::makeTitle( $result->nsb, $result->tb ); diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index 4fde0a606f..5bf205cb78 100644 --- a/includes/specials/SpecialFileDuplicateSearch.php +++ b/includes/specials/SpecialFileDuplicateSearch.php @@ -53,7 +53,7 @@ class FileDuplicateSearchPage extends QueryPage { $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"; diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index e15b6959ac..fa23649a94 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -140,8 +140,10 @@ class ImageListPager extends TablePager { 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 ); } diff --git a/includes/specials/SpecialListredirects.php b/includes/specials/SpecialListredirects.php index 9555bd16da..bf5940702e 100644 --- a/includes/specials/SpecialListredirects.php +++ b/includes/specials/SpecialListredirects.php @@ -32,7 +32,12 @@ class ListredirectsPage extends QueryPage { # 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 ); @@ -41,7 +46,7 @@ class ListredirectsPage extends QueryPage { $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 "$rd_link"; diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index fb8005d937..eafc05432f 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -117,7 +117,7 @@ class UsersPager extends AlphabeticPager { 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(); diff --git a/includes/specials/SpecialMIMEsearch.php b/includes/specials/SpecialMIMEsearch.php index 4672b0a3ad..3bd89a9e12 100644 --- a/includes/specials/SpecialMIMEsearch.php +++ b/includes/specials/SpecialMIMEsearch.php @@ -72,7 +72,7 @@ class MIMEsearchPage extends QueryPage { $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"; diff --git a/includes/specials/SpecialMostlinked.php b/includes/specials/SpecialMostlinked.php index 078489bd13..e63e250191 100644 --- a/includes/specials/SpecialMostlinked.php +++ b/includes/specials/SpecialMostlinked.php @@ -75,7 +75,7 @@ class MostlinkedPage extends QueryPage { 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 ); diff --git a/includes/specials/SpecialMostlinkedcategories.php b/includes/specials/SpecialMostlinkedcategories.php index ab250675bc..20a35c9782 100644 --- a/includes/specials/SpecialMostlinkedcategories.php +++ b/includes/specials/SpecialMostlinkedcategories.php @@ -58,7 +58,7 @@ class MostlinkedCategoriesPage extends QueryPage { $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 ) ); diff --git a/includes/specials/SpecialMostlinkedtemplates.php b/includes/specials/SpecialMostlinkedtemplates.php index 2d398a3810..76c1a09dec 100644 --- a/includes/specials/SpecialMostlinkedtemplates.php +++ b/includes/specials/SpecialMostlinkedtemplates.php @@ -95,7 +95,7 @@ class SpecialMostlinkedtemplates extends QueryPage { $skin->link( $title ); return wfSpecialList( - $skin->makeLinkObj( $title ), + $skin->link( $title ), $this->makeWlhLink( $title, $skin, $result ) ); } diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 8fcf33a93f..7974e2bd46 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -91,7 +91,7 @@ class MovePageForm { $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 ) ); @@ -468,7 +468,7 @@ class MovePageForm { $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 ); } } diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index 575e37a714..88e34f43a7 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -125,7 +125,7 @@ function wfSpecialNewimages( $par, $specialPage ) { $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
    \n".$wgLang->timeanddate( $s->img_timestamp, true )."
    \n" ); diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index a38a8cd190..aeb1d7b9c1 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -65,7 +65,7 @@ class ProtectedPagesForm { $skin = $wgUser->getSkin(); $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title ); - $link = $skin->makeLinkObj( $title ); + $link = $skin->link( $title ); $description_items = array (); diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index 7e8126d91f..720b2f612f 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -61,7 +61,7 @@ class ProtectedTitlesForm { $skin = $wgUser->getSkin(); $title = Title::makeTitleSafe( $row->pt_namespace, $row->pt_title ); - $link = $skin->makeLinkObj( $title ); + $link = $skin->link( $title ); $description_items = array (); diff --git a/includes/specials/SpecialShortpages.php b/includes/specials/SpecialShortpages.php index 2e7d24a5a0..70f5c3001e 100644 --- a/includes/specials/SpecialShortpages.php +++ b/includes/specials/SpecialShortpages.php @@ -76,7 +76,7 @@ class ShortPagesPage extends QueryPage { } $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 ) ) ); diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index da518e93ea..1c574be127 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -866,14 +866,14 @@ class UndeleteForm { 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' ) ) { @@ -893,10 +893,15 @@ class UndeleteForm { } return '
    ' . - $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' ) : '' ) . '
    ' . '
    ' . diff --git a/includes/specials/SpecialUnusedcategories.php b/includes/specials/SpecialUnusedcategories.php index 406f794409..fe7d7a17ce 100644 --- a/includes/specials/SpecialUnusedcategories.php +++ b/includes/specials/SpecialUnusedcategories.php @@ -34,7 +34,7 @@ class UnusedCategoriesPage extends QueryPage { function formatResult( $skin, $result ) { $title = Title::makeTitle( NS_CATEGORY, $result->title ); - return $skin->makeLinkObj( $title, $title->getText() ); + return $skin->link( $title, $title->getText() ); } } diff --git a/includes/specials/SpecialWantedcategories.php b/includes/specials/SpecialWantedcategories.php index 9a28301a4f..4d54c86e37 100644 --- a/includes/specials/SpecialWantedcategories.php +++ b/includes/specials/SpecialWantedcategories.php @@ -44,7 +44,7 @@ class WantedCategoriesPage extends WantedQueryPage { $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'),