Index: trunk/phase3/includes/Linker.php |
— | — | @@ -1345,7 +1345,12 @@ |
1346 | 1346 | $linkRegexp = '/\[\[(.*?)\]\]' . preg_quote( $trail, '/' ) . '/'; |
1347 | 1347 | if (isset($match[1][0]) && $match[1][0] == ':') |
1348 | 1348 | $match[1] = substr($match[1], 1); |
1349 | | - $thelink = $this->makeLink( $match[1], $text, "", $trail ); |
| 1349 | + list( $inside, $trail ) = Linker::splitTrail( $trail ); |
| 1350 | + $linkTarget = Title::newFromText( $match[1] ); |
| 1351 | + $thelink = $this->link( |
| 1352 | + linkTarget, |
| 1353 | + $text . $inside, |
| 1354 | + ) . $trail; |
1350 | 1355 | } |
1351 | 1356 | $comment = preg_replace( $linkRegexp, StringUtils::escapeRegexReplacement( $thelink ), $comment, 1 ); |
1352 | 1357 | |
Index: trunk/phase3/includes/specials/SpecialStatistics.php |
— | — | @@ -184,13 +184,19 @@ |
185 | 185 | } else { |
186 | 186 | $grouppageLocalized = $msg; |
187 | 187 | } |
188 | | - $grouppage = $sk->makeLink( $grouppageLocalized, htmlspecialchars( $groupnameLocalized ) ); |
189 | | - $grouplink = $sk->link( SpecialPage::getTitleFor( 'Listusers' ), |
| 188 | + $linkTarget = Title::newFromText( $grouppageLocalized ); |
| 189 | + $grouppage = $sk->link( |
| 190 | + $linkTarget, |
| 191 | + htmlspecialchars( $groupnameLocalized ) |
| 192 | + ); |
| 193 | + $grouplink = $sk->link( |
| 194 | + SpecialPage::getTitleFor( 'Listusers' ), |
190 | 195 | wfMsgHtml( 'listgrouprights-members' ), |
191 | 196 | array(), |
192 | 197 | array( 'group' => $group ), |
193 | | - 'known' ); |
194 | | - # Add a class when a usergroup contains no members to allow hiding these rows |
| 198 | + 'known' |
| 199 | + ); |
| 200 | + # Add a class when a usergroup contains no members to allow hiding these rows |
195 | 201 | $classZero = ''; |
196 | 202 | $countUsers = SiteStats::numberingroup( $groupname ); |
197 | 203 | if( $countUsers == 0 ) { |
Index: trunk/phase3/includes/specials/SpecialFileDuplicateSearch.php |
— | — | @@ -51,7 +51,10 @@ |
52 | 52 | |
53 | 53 | $nt = Title::makeTitle( NS_FILE, $result->title ); |
54 | 54 | $text = $wgContLang->convert( $nt->getText() ); |
55 | | - $plink = $skin->makeLink( $nt->getPrefixedText(), $text ); |
| 55 | + $plink = $skin->link( |
| 56 | + Title::newFromText( $nt->getPrefixedText() ), |
| 57 | + $text |
| 58 | + ); |
56 | 59 | |
57 | 60 | $user = $skin->link( Title::makeTitle( NS_USER, $result->img_user_text ), $result->img_user_text ); |
58 | 61 | $time = $wgLang->timeanddate( $result->img_timestamp ); |
Index: trunk/phase3/includes/specials/SpecialListgrouprights.php |
— | — | @@ -61,14 +61,29 @@ |
62 | 62 | // Do not make a link for the generic * group |
63 | 63 | $grouppage = htmlspecialchars($groupnameLocalized); |
64 | 64 | } else { |
65 | | - $grouppage = $this->skin->makeLink( $grouppageLocalized, htmlspecialchars($groupnameLocalized) ); |
| 65 | + $grouppage = $this->skin->link( |
| 66 | + Title::newFromText( $grouppageLocalized ), |
| 67 | + htmlspecialchars($groupnameLocalized) |
| 68 | + ); |
66 | 69 | } |
67 | 70 | |
68 | 71 | if ( $group === 'user' ) { |
69 | 72 | // Link to Special:listusers for implicit group 'user' |
70 | | - $grouplink = '<br />' . $this->skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Listusers' ), wfMsgHtml( 'listgrouprights-members' ), '' ); |
| 73 | + $grouplink = '<br />' . $this->skin->link( |
| 74 | + SpecialPage::getTitleFor( 'Listusers' ), |
| 75 | + wfMsgHtml( 'listgrouprights-members' ), |
| 76 | + array(), |
| 77 | + array(), |
| 78 | + array( 'known', 'noclasses' ) |
| 79 | + ); |
71 | 80 | } elseif ( !in_array( $group, $wgImplicitGroups ) ) { |
72 | | - $grouplink = '<br />' . $this->skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Listusers' ), wfMsgHtml( 'listgrouprights-members' ), 'group=' . $group ); |
| 81 | + $grouplink = '<br />' . $this->skin->link( |
| 82 | + SpecialPage::getTitleFor( 'Listusers' ), |
| 83 | + wfMsgHtml( 'listgrouprights-members' ), |
| 84 | + array(), |
| 85 | + array( 'group' => $group ), |
| 86 | + array( 'known', 'noclasses' ) |
| 87 | + ); |
73 | 88 | } else { |
74 | 89 | // No link to Special:listusers for other implicit groups as they are unlistable |
75 | 90 | $grouplink = ''; |
Index: trunk/phase3/includes/specials/SpecialMIMEsearch.php |
— | — | @@ -65,7 +65,10 @@ |
66 | 66 | |
67 | 67 | $nt = Title::makeTitle( $result->namespace, $result->title ); |
68 | 68 | $text = $wgContLang->convert( $nt->getText() ); |
69 | | - $plink = $skin->makeLink( $nt->getPrefixedText(), htmlspecialchars($text) ); |
| 69 | + $plink = $skin->link( |
| 70 | + Title::newFromText( $nt->getPrefixedText() ), |
| 71 | + htmlspecialchars( $text ) |
| 72 | + ); |
70 | 73 | |
71 | 74 | $download = $skin->makeMediaLinkObj( $nt, wfMsgHtml( 'download' ) ); |
72 | 75 | $bytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape'), |
Index: trunk/phase3/includes/ImageGallery.php |
— | — | @@ -250,8 +250,15 @@ |
251 | 251 | . htmlspecialchars( $nt->getText() ) . '</div>'; |
252 | 252 | } elseif( $this->mHideBadImages && wfIsBadImage( $nt->getDBkey(), $this->getContextTitle() ) ) { |
253 | 253 | # The image is blacklisted, just show it as a text link. |
254 | | - $thumbhtml = "\n\t\t\t".'<div style="height: '.($this->mHeights*1.25+2).'px;">' |
255 | | - . $sk->makeKnownLinkObj( $nt, htmlspecialchars( $nt->getText() ) ) . '</div>'; |
| 254 | + $thumbhtml = "\n\t\t\t".'<div style="height: '.($this->mHeights*1.25+2).'px;">' . |
| 255 | + $sk->link( |
| 256 | + $nt, |
| 257 | + htmlspecialchars( $nt->getText() ), |
| 258 | + array() |
| 259 | + array(), |
| 260 | + array( 'known', 'noclasses' ) |
| 261 | + ) . |
| 262 | + '</div>'; |
256 | 263 | } elseif( !( $thumb = $img->transform( $params ) ) ) { |
257 | 264 | # Error generating thumbnail. |
258 | 265 | $thumbhtml = "\n\t\t\t".'<div style="height: '.($this->mHeights*1.25+2).'px;">' |
— | — | @@ -274,7 +281,8 @@ |
275 | 282 | } |
276 | 283 | |
277 | 284 | //TODO |
278 | | - //$ul = $sk->makeLink( $wgContLang->getNsText( MWNamespace::getUser() ) . ":{$ut}", $ut ); |
| 285 | + // $linkTarget = Title::newFromText( $wgContLang->getNsText( MWNamespace::getUser() ) . ":{$ut}" ); |
| 286 | + // $ul = $sk->link( $linkTarget, $ut ); |
279 | 287 | |
280 | 288 | if( $this->mShowBytes ) { |
281 | 289 | if( $img ) { |
— | — | @@ -289,7 +297,13 @@ |
290 | 298 | } |
291 | 299 | |
292 | 300 | $textlink = $this->mShowFilename ? |
293 | | - $sk->makeKnownLinkObj( $nt, htmlspecialchars( $wgLang->truncate( $nt->getText(), 20 ) ) ) . "<br />\n" : |
| 301 | + $sk->link( |
| 302 | + $nt, |
| 303 | + htmlspecialchars( $wgLang->truncate( $nt->getText(), 20 ) ) |
| 304 | + array(), |
| 305 | + array(), |
| 306 | + array( 'known', 'noclasses' ) |
| 307 | + ) . "<br />\n" : |
294 | 308 | '' ; |
295 | 309 | |
296 | 310 | # ATTENTION: The newline after <div class="gallerytext"> is needed to accommodate htmltidy which |