Index: trunk/phase3/includes/specials/SpecialNewpages.php |
— | — | @@ -255,9 +255,24 @@ |
256 | 256 | |
257 | 257 | $title = Title::makeTitleSafe( $result->rc_namespace, $result->rc_title ); |
258 | 258 | $time = htmlspecialchars( $wgLang->timeAndDate( $result->rc_timestamp, true ) ); |
259 | | - $query = $this->patrollable( $result ) ? "rcid={$result->rc_id}&redirect=no" : 'redirect=no'; |
260 | | - $plink = $this->skin->makeKnownLinkObj( $title, '', $query ); |
261 | | - $hist = $this->skin->makeKnownLinkObj( $title, wfMsgHtml( 'hist' ), 'action=history' ); |
| 259 | + |
| 260 | + $query = array( 'redirect' => 'no' ); |
| 261 | + |
| 262 | + if( $this->patrollable( $result ) ) |
| 263 | + $query['rcid'] = $result->rc_id; |
| 264 | + |
| 265 | + $plink = $this->skin->linkKnown( |
| 266 | + $title, |
| 267 | + null, |
| 268 | + array(), |
| 269 | + $query |
| 270 | + ); |
| 271 | + $hist = $this->skin->linkKnown( |
| 272 | + $title, |
| 273 | + wfMsgHtml( 'hist' ), |
| 274 | + array(), |
| 275 | + array( 'action' => 'history' ) |
| 276 | + ); |
262 | 277 | $length = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), |
263 | 278 | $wgLang->formatNum( $result->length ) ); |
264 | 279 | $ulink = $this->skin->userLink( $result->rc_user, $result->rc_user_text ) . ' ' . |
Index: trunk/phase3/includes/specials/SpecialShortpages.php |
— | — | @@ -74,10 +74,15 @@ |
75 | 75 | if ( !$title ) { |
76 | 76 | return '<!-- Invalid title ' . htmlspecialchars( "{$result->namespace}:{$result->title}" ). '-->'; |
77 | 77 | } |
78 | | - $hlink = $skin->makeKnownLinkObj( $title, wfMsgHtml( 'hist' ), 'action=history' ); |
| 78 | + $hlink = $skin->linkKnown( |
| 79 | + $title, |
| 80 | + wfMsgHtml( 'hist' ), |
| 81 | + array(), |
| 82 | + array( 'action' => 'history' ) |
| 83 | + ); |
79 | 84 | $plink = $this->isCached() |
80 | 85 | ? $skin->link( $title ) |
81 | | - : $skin->makeKnownLinkObj( $title ); |
| 86 | + : $skin->linkKnown( $title ); |
82 | 87 | $size = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), $wgLang->formatNum( htmlspecialchars( $result->value ) ) ); |
83 | 88 | |
84 | 89 | return $title->exists() |
Index: trunk/phase3/includes/specials/SpecialDoubleRedirects.php |
— | — | @@ -80,10 +80,20 @@ |
81 | 81 | $titleB = Title::makeTitle( $result->nsb, $result->tb ); |
82 | 82 | $titleC = Title::makeTitle( $result->nsc, $result->tc ); |
83 | 83 | |
84 | | - $linkA = $skin->makeKnownLinkObj( $titleA, '', 'redirect=no' ); |
| 84 | + $linkA = $skin->linkKnown( |
| 85 | + $titleA, |
| 86 | + null, |
| 87 | + array(), |
| 88 | + array( 'redirect' => 'no' ) |
| 89 | + ); |
85 | 90 | $edit = $skin->makeBrokenLinkObj( $titleA, "(".wfMsgHtml("qbedit").")" , 'redirect=no'); |
86 | | - $linkB = $skin->makeKnownLinkObj( $titleB, '', 'redirect=no' ); |
87 | | - $linkC = $skin->makeKnownLinkObj( $titleC ); |
| 91 | + $linkB = $skin->linkKnown( |
| 92 | + $titleB, |
| 93 | + null, |
| 94 | + array(), |
| 95 | + array( 'redirect' => 'no' ) |
| 96 | + ); |
| 97 | + $linkC = $skin->linkKnown( $titleC ); |
88 | 98 | $arr = $wgContLang->getArrow() . $wgContLang->getDirMark(); |
89 | 99 | |
90 | 100 | return( "{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" ); |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -632,7 +632,7 @@ |
633 | 633 | } |
634 | 634 | |
635 | 635 | if( $file->exists() ) { |
636 | | - $dlink = $sk->makeKnownLinkObj( $file->getTitle() ); |
| 636 | + $dlink = $sk->linkKnown( $file->getTitle() ); |
637 | 637 | if ( $file->allowInlineDisplay() ) { |
638 | 638 | $dlink2 = $sk->makeImageLinkObj( $file->getTitle(), wfMsgExt( 'fileexists-thumb', 'parseinline' ), |
639 | 639 | $file->getName(), $align, array(), false, true ); |
— | — | @@ -647,12 +647,17 @@ |
648 | 648 | $warning .= '<li>' . wfMsgExt( 'fileexists', array('parseinline','replaceafter'), $dlink ) . '</li>' . $dlink2; |
649 | 649 | |
650 | 650 | } elseif( $file->getTitle()->getArticleID() ) { |
651 | | - $lnk = $sk->makeKnownLinkObj( $file->getTitle(), '', 'redirect=no' ); |
| 651 | + $lnk = $sk->linkKnown( |
| 652 | + $file->getTitle(), |
| 653 | + null, |
| 654 | + array(), |
| 655 | + array( 'redirect' => 'no' ) |
| 656 | + ); |
652 | 657 | $warning .= '<li>' . wfMsgExt( 'filepageexists', array( 'parseinline', 'replaceafter' ), $lnk ) . '</li>'; |
653 | 658 | } elseif ( $file_lc && $file_lc->exists() ) { |
654 | 659 | # Check if image with lowercase extension exists. |
655 | 660 | # It's not forbidden but in 99% it makes no sense to upload the same filename with uppercase extension |
656 | | - $dlink = $sk->makeKnownLinkObj( $nt_lc ); |
| 661 | + $dlink = $sk->linkKnown( $nt_lc ); |
657 | 662 | if ( $file_lc->allowInlineDisplay() ) { |
658 | 663 | $dlink2 = $sk->makeImageLinkObj( $nt_lc, wfMsgExt( 'fileexists-thumb', 'parseinline' ), |
659 | 664 | $nt_lc->getText(), $align, array(), false, true ); |
— | — | @@ -677,7 +682,7 @@ |
678 | 683 | $file_thb = wfLocalFile( $nt_thb ); |
679 | 684 | if ($file_thb->exists() ) { |
680 | 685 | # Check if an image without leading '180px-' (or similiar) exists |
681 | | - $dlink = $sk->makeKnownLinkObj( $nt_thb); |
| 686 | + $dlink = $sk->linkKnown( $nt_thb ); |
682 | 687 | if ( $file_thb->allowInlineDisplay() ) { |
683 | 688 | $dlink2 = $sk->makeImageLinkObj( $nt_thb, |
684 | 689 | wfMsgExt( 'fileexists-thumb', 'parseinline' ), |
— | — | @@ -713,8 +718,15 @@ |
714 | 719 | # If the file existed before and was deleted, warn the user of this |
715 | 720 | # Don't bother doing so if the file exists now, however |
716 | 721 | $ltitle = SpecialPage::getTitleFor( 'Log' ); |
717 | | - $llink = $sk->makeKnownLinkObj( $ltitle, wfMsgHtml( 'deletionlog' ), |
718 | | - 'type=delete&page=' . $file->getTitle()->getPrefixedUrl() ); |
| 722 | + $llink = $sk->linkKnown( |
| 723 | + $ltitle, |
| 724 | + wfMsgHtml( 'deletionlog' ), |
| 725 | + array(), |
| 726 | + array( |
| 727 | + 'type' => 'delete', |
| 728 | + 'page' => $file->getTitle()->getPrefixedUrl() |
| 729 | + ) |
| 730 | + ); |
719 | 731 | $warning .= '<li>' . wfMsgWikiHtml( 'filewasdeleted', $llink ) . '</li>'; |
720 | 732 | } |
721 | 733 | return $warning; |
— | — | @@ -992,7 +1004,7 @@ |
993 | 1005 | $link = wfMsgExt( |
994 | 1006 | $wgUser->isAllowed( 'delete' ) ? 'thisisdeleted' : 'viewdeleted', |
995 | 1007 | array( 'parse', 'replaceafter' ), |
996 | | - $wgUser->getSkin()->makeKnownLinkObj( |
| 1008 | + $wgUser->getSkin()->linkKnown( |
997 | 1009 | SpecialPage::getTitleFor( 'Undelete', $title->getPrefixedText() ), |
998 | 1010 | wfMsgExt( 'restorelink', array( 'parsemag', 'escape' ), $count ) |
999 | 1011 | ) |
Index: trunk/phase3/includes/specials/SpecialFewestrevisions.php |
— | — | @@ -55,14 +55,21 @@ |
56 | 56 | $nt = Title::makeTitleSafe( $result->namespace, $result->title ); |
57 | 57 | $text = $wgContLang->convert( $nt->getPrefixedText() ); |
58 | 58 | |
59 | | - $plink = $skin->makeKnownLinkObj( $nt, $text ); |
| 59 | + $plink = $skin->linkKnown( |
| 60 | + $nt, |
| 61 | + $text |
| 62 | + ); |
60 | 63 | |
61 | 64 | $nl = wfMsgExt( 'nrevisions', array( 'parsemag', 'escape' ), |
62 | 65 | $wgLang->formatNum( $result->value ) ); |
63 | 66 | $redirect = $result->redirect ? ' - ' . wfMsgHtml( 'isredirect' ) : ''; |
64 | | - $nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' ) . $redirect; |
| 67 | + $nlink = $skin->linkKnown( |
| 68 | + $nt, |
| 69 | + $nl, |
| 70 | + array(), |
| 71 | + array( 'action' => 'history' ) |
| 72 | + ) . $redirect; |
65 | 73 | |
66 | | - |
67 | 74 | return wfSpecialList( $plink, $nlink ); |
68 | 75 | } |
69 | 76 | } |
Index: trunk/phase3/includes/specials/SpecialAllmessages.php |
— | — | @@ -52,8 +52,8 @@ |
53 | 53 | $navText .= wfAllMessagesMakePhp( $messages ); |
54 | 54 | $wgOut->addHTML( $wgLang->pipeList( array( |
55 | 55 | 'PHP', |
56 | | - '<a href="' . $title->escapeLocalUrl( 'ot=html' ) . '">HTML</a>', |
57 | | - '<a href="' . $title->escapeLocalUrl( 'ot=xml' ) . '">XML</a>' . |
| 56 | + '<a href="' . $title->escapeLocalUrl( array( 'ot' => 'html' ) ) . '">HTML</a>', |
| 57 | + '<a href="' . $title->escapeLocalUrl( array( 'ot' => 'xml' ) ) . '">XML</a>' . |
58 | 58 | '<pre>' . htmlspecialchars( $navText ) . '</pre>' |
59 | 59 | ) ) ); |
60 | 60 | } else if ( $ot == 'xml' ) { |
— | — | @@ -62,9 +62,9 @@ |
63 | 63 | echo wfAllMessagesMakeXml( $messages ); |
64 | 64 | } else { |
65 | 65 | $wgOut->addHTML( $wgLang->pipeList( array( |
66 | | - '<a href="' . $title->escapeLocalUrl( 'ot=php' ) . '">PHP</a>', |
| 66 | + '<a href="' . $title->escapeLocalUrl( array( 'ot' => 'php' ) ) . '">PHP</a>', |
67 | 67 | 'HTML', |
68 | | - '<a href="' . $title->escapeLocalUrl( 'ot=xml' ) . '">XML</a>' |
| 68 | + '<a href="' . $title->escapeLocalUrl( array( 'ot' => 'xml' ) ) . '">XML</a>' |
69 | 69 | ) ) ); |
70 | 70 | $wgOut->addWikiText( $navText ); |
71 | 71 | $wgOut->addHTML( wfAllMessagesMakeHTMLText( $messages ) ); |
— | — | @@ -188,14 +188,17 @@ |
189 | 189 | $mw = htmlspecialchars( $m['msg'] ); |
190 | 190 | |
191 | 191 | if( array_key_exists( $title, $pageExists[NS_MEDIAWIKI] ) ) { |
192 | | - $pageLink = $sk->makeKnownLinkObj( $titleObj, "<span id=\"sp-allmessages-i-$i\">" . |
193 | | - htmlspecialchars( $key ) . '</span>' ); |
| 192 | + // FIXME: the span should be taken care of in $customAttribs, shouldn't it? |
| 193 | + $pageLink = $sk->linkKnown( |
| 194 | + $titleObj, |
| 195 | + "<span id=\"sp-allmessages-i-$i\">" . htmlspecialchars( $key ) . '</span>' |
| 196 | + ); |
194 | 197 | } else { |
195 | 198 | $pageLink = $sk->makeBrokenLinkObj( $titleObj, "<span id=\"sp-allmessages-i-$i\">" . |
196 | 199 | htmlspecialchars( $key ) . '</span>' ); |
197 | 200 | } |
198 | 201 | if( array_key_exists( $title, $pageExists[NS_MEDIAWIKI_TALK] ) ) { |
199 | | - $talkLink = $sk->makeKnownLinkObj( $talkPage, htmlspecialchars( $talk ) ); |
| 202 | + $talkLink = $sk->linkKnown( $talkPage, htmlspecialchars( $talk ) ); |
200 | 203 | } else { |
201 | 204 | $talkLink = $sk->makeBrokenLinkObj( $talkPage, htmlspecialchars( $talk ) ); |
202 | 205 | } |
Index: trunk/phase3/includes/specials/SpecialSpecialpages.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | $wgOut->addHTML( "<td width='30%' valign='top'><ul>\n" ); |
62 | 62 | foreach( $sortedPages as $desc => $specialpage ) { |
63 | 63 | list( $title, $restricted ) = $specialpage; |
64 | | - $link = $sk->makeKnownLinkObj( $title , htmlspecialchars( $desc ) ); |
| 64 | + $link = $sk->linkKnown( $title , htmlspecialchars( $desc ) ); |
65 | 65 | if( $restricted ) { |
66 | 66 | $includesRestrictedPages = true; |
67 | 67 | $wgOut->addHTML( "<li class='mw-specialpages-page mw-specialpagerestricted'><strong>{$link}</strong></li>\n" ); |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -157,26 +157,41 @@ |
158 | 158 | if( ( $id != 0 && $wgSysopUserBans ) || ( $id == 0 && IP::isIPAddress( $nt->getText() ) ) ) { |
159 | 159 | # Block link |
160 | 160 | if( $wgUser->isAllowed( 'block' ) ) |
161 | | - $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Blockip', |
162 | | - $nt->getDBkey() ), wfMsgHtml( 'blocklink' ) ); |
| 161 | + $tools[] = $sk->linkKnown( |
| 162 | + SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ), |
| 163 | + wfMsgHtml( 'blocklink' ) |
| 164 | + ); |
163 | 165 | # Block log link |
164 | | - $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Log' ), |
165 | | - wfMsgHtml( 'sp-contributions-blocklog' ), 'type=block&page=' . $nt->getPrefixedUrl() ); |
| 166 | + $tools[] = $sk->linkKnown( |
| 167 | + SpecialPage::getTitleFor( 'Log' ), |
| 168 | + wfMsgHtml( 'sp-contributions-blocklog' ), |
| 169 | + array(), |
| 170 | + array( |
| 171 | + 'type' => 'block', |
| 172 | + 'page' => $nt->getPrefixedUrl() |
| 173 | + ) |
| 174 | + ); |
166 | 175 | } |
167 | 176 | # Other logs link |
168 | | - $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Log' ), wfMsg( 'sp-contributions-logs' ), |
169 | | - 'user=' . $nt->getPartialUrl() ); |
| 177 | + $tools[] = $sk->linkKnown( |
| 178 | + SpecialPage::getTitleFor( 'Log' ), |
| 179 | + wfMsg( 'sp-contributions-logs' ), |
| 180 | + array(), |
| 181 | + array( 'user' => $nt->getPartialUrl() ) |
| 182 | + ); |
170 | 183 | |
171 | 184 | # Add link to deleted user contributions for priviledged users |
172 | 185 | if( $wgUser->isAllowed( 'deletedhistory' ) ) { |
173 | | - $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'DeletedContributions', |
174 | | - $nt->getDBkey() ), wfMsgHtml( 'sp-contributions-deleted' ) ); |
| 186 | + $tools[] = $sk->linkKnown( |
| 187 | + SpecialPage::getTitleFor( 'DeletedContributions', $nt->getDBkey() ), |
| 188 | + wfMsgHtml( 'sp-contributions-deleted' ) |
| 189 | + ); |
175 | 190 | } |
176 | 191 | |
177 | 192 | # Add a link to change user rights for privileged users |
178 | 193 | $userrightsPage = new UserrightsPage(); |
179 | 194 | if( 0 !== $id && $userrightsPage->userCanChangeRights( User::newFromId( $id ) ) ) { |
180 | | - $tools[] = $sk->makeKnownLinkObj( |
| 195 | + $tools[] = $sk->linkKnown( |
181 | 196 | SpecialPage::getTitleFor( 'Userrights', $nt->getDBkey() ), |
182 | 197 | wfMsgHtml( 'sp-contributions-userrights' ) |
183 | 198 | ); |
— | — | @@ -493,7 +508,12 @@ |
494 | 509 | if( $row->rev_id == $row->page_latest ) { |
495 | 510 | $topmarktext .= '<span class="mw-uctop">' . $this->messages['uctop'] . '</span>'; |
496 | 511 | if( !$row->page_is_new ) { |
497 | | - $difftext .= '(' . $sk->makeKnownLinkObj( $page, $this->messages['diff'], 'diff=0' ) . ')'; |
| 512 | + $difftext .= '(' . $sk->linkKnown( |
| 513 | + $page, |
| 514 | + $this->messages['diff'], |
| 515 | + array(), |
| 516 | + array( 'diff' => 0 ) |
| 517 | + ) . ')'; |
498 | 518 | # Add rollback link |
499 | 519 | if( $page->quickUserCan( 'rollback') && $page->quickUserCan( 'edit' ) ) { |
500 | 520 | $topmarktext .= ' '.$sk->generateRollback( $rev ); |
— | — | @@ -504,16 +524,33 @@ |
505 | 525 | } |
506 | 526 | # Is there a visible previous revision? |
507 | 527 | if( $rev->userCan(Revision::DELETED_TEXT) ) { |
508 | | - $difftext = '(' . $sk->makeKnownLinkObj( $page, $this->messages['diff'], |
509 | | - 'diff=prev&oldid='.$row->rev_id ) . ')'; |
| 528 | + $difftext = '(' . $sk->linkKnown( |
| 529 | + $page, |
| 530 | + $this->messages['diff'], |
| 531 | + array(), |
| 532 | + array( |
| 533 | + 'diff' => 'prev', |
| 534 | + 'oldid' => $row->rev_id |
| 535 | + ) |
| 536 | + ) . ')'; |
510 | 537 | } else { |
511 | 538 | $difftext = '(' . $this->messages['diff'] . ')'; |
512 | 539 | } |
513 | | - $histlink = '('.$sk->makeKnownLinkObj( $page, $this->messages['hist'], 'action=history' ) . ')'; |
| 540 | + $histlink = '('.$sk->linkKnown( |
| 541 | + $page, |
| 542 | + $this->messages['hist'], |
| 543 | + array(), |
| 544 | + array( 'action' => 'history' ) |
| 545 | + ) . ')'; |
514 | 546 | |
515 | 547 | $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true ); |
516 | 548 | $date = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true ); |
517 | | - $d = $sk->makeKnownLinkObj( $page, htmlspecialchars($date), 'oldid='.intval($row->rev_id) ); |
| 549 | + $d = $sk->linkKnown( |
| 550 | + $page, |
| 551 | + htmlspecialchars($date), |
| 552 | + array(), |
| 553 | + array( 'oldid' => intval( $row->rev_id ) ) |
| 554 | + ); |
518 | 555 | |
519 | 556 | if( $this->target == 'newbies' ) { |
520 | 557 | $userlink = ' . . ' . $sk->userLink( $row->rev_user, $row->rev_user_text ); |
Index: trunk/phase3/includes/specials/SpecialPopularpages.php |
— | — | @@ -48,9 +48,15 @@ |
49 | 49 | function formatResult( $skin, $result ) { |
50 | 50 | global $wgLang, $wgContLang; |
51 | 51 | $title = Title::makeTitle( $result->namespace, $result->title ); |
52 | | - $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) ); |
53 | | - $nv = wfMsgExt( 'nviews', array( 'parsemag', 'escape'), |
54 | | - $wgLang->formatNum( $result->value ) ); |
| 52 | + $link = $skin->linkKnown( |
| 53 | + $title, |
| 54 | + htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) |
| 55 | + ); |
| 56 | + $nv = wfMsgExt( |
| 57 | + 'nviews', |
| 58 | + array( 'parsemag', 'escape'), |
| 59 | + $wgLang->formatNum( $result->value ) |
| 60 | + ); |
55 | 61 | return wfSpecialList($link, $nv); |
56 | 62 | } |
57 | 63 | } |
Index: trunk/phase3/includes/specials/SpecialSearch.php |
— | — | @@ -103,7 +103,7 @@ |
104 | 104 | wfRunHooks( 'SpecialSearchNogomatch', array( &$t ) ); |
105 | 105 | # If the feature is enabled, go straight to the edit page |
106 | 106 | if( $wgGoToEdit ) { |
107 | | - $wgOut->redirect( $t->getFullURL( 'action=edit' ) ); |
| 107 | + $wgOut->redirect( $t->getFullURL( array( 'action' => 'edit' ) ) ); |
108 | 108 | return; |
109 | 109 | } |
110 | 110 | } |
— | — | @@ -165,17 +165,24 @@ |
166 | 166 | // did you mean... suggestions |
167 | 167 | if( $textMatches && $textMatches->hasSuggestion() ) { |
168 | 168 | $st = SpecialPage::getTitleFor( 'Search' ); |
| 169 | + |
169 | 170 | # mirror Go/Search behaviour of original request .. |
170 | 171 | $didYouMeanParams = array( 'search' => $textMatches->getSuggestionQuery() ); |
| 172 | + |
171 | 173 | if($this->fulltext != NULL) |
172 | 174 | $didYouMeanParams['fulltext'] = $this->fulltext; |
173 | | - $stParams = wfArrayToCGI( |
| 175 | + |
| 176 | + $stParams = array_merge( |
174 | 177 | $didYouMeanParams, |
175 | 178 | $this->powerSearchOptions() |
176 | 179 | ); |
177 | | - $suggestLink = $sk->makeKnownLinkObj( $st, |
| 180 | + |
| 181 | + $suggestLink = $sk->linkKnown( |
| 182 | + $st, |
178 | 183 | $textMatches->getSuggestionSnippet(), |
179 | | - $stParams ); |
| 184 | + array(), |
| 185 | + $stParams |
| 186 | + ); |
180 | 187 | |
181 | 188 | $this->didYouMeanHtml = '<div class="searchdidyoumean">'.wfMsg('search-suggest',$suggestLink).'</div>'; |
182 | 189 | } |
— | — | @@ -406,7 +413,10 @@ |
407 | 414 | $sk = $wgUser->getSkin(); |
408 | 415 | $t = $result->getTitle(); |
409 | 416 | |
410 | | - $link = $this->sk->makeKnownLinkObj( $t, $result->getTitleSnippet($terms)); |
| 417 | + $link = $this->sk->linkKnown( |
| 418 | + $t, |
| 419 | + $result->getTitleSnippet($terms) |
| 420 | + ); |
411 | 421 | |
412 | 422 | //If page content is not readable, just return the title. |
413 | 423 | //This is not quite safe, but better than showing excerpts from non-readable pages |
— | — | @@ -430,15 +440,29 @@ |
431 | 441 | $sectionTitle = $result->getSectionTitle(); |
432 | 442 | $sectionText = $result->getSectionSnippet($terms); |
433 | 443 | $redirect = ''; |
| 444 | + |
434 | 445 | if( !is_null($redirectTitle) ) |
435 | | - $redirect = "<span class='searchalttitle'>" |
436 | | - .wfMsg('search-redirect',$this->sk->makeKnownLinkObj( $redirectTitle, $redirectText)) |
437 | | - ."</span>"; |
| 446 | + $redirect = "<span class='searchalttitle'>" . |
| 447 | + wfMsg( |
| 448 | + 'search-redirect', |
| 449 | + $this->sk->linkKnown( |
| 450 | + $redirectTitle, |
| 451 | + $redirectText |
| 452 | + ) |
| 453 | + ) . |
| 454 | + "</span>"; |
| 455 | + |
438 | 456 | $section = ''; |
| 457 | + |
439 | 458 | if( !is_null($sectionTitle) ) |
440 | | - $section = "<span class='searchalttitle'>" |
441 | | - .wfMsg('search-section', $this->sk->makeKnownLinkObj( $sectionTitle, $sectionText)) |
442 | | - ."</span>"; |
| 459 | + $section = "<span class='searchalttitle'>" . |
| 460 | + wfMsg( |
| 461 | + 'search-section', $this->sk->linkKnown( |
| 462 | + $sectionTitle, |
| 463 | + $sectionText |
| 464 | + ) |
| 465 | + ) . |
| 466 | + "</span>"; |
443 | 467 | |
444 | 468 | // format text extract |
445 | 469 | $extract = "<div class='searchresult'>".$result->getTextSnippet($terms)."</div>"; |
— | — | @@ -457,20 +481,32 @@ |
458 | 482 | $byteSize = $result->getByteSize(); |
459 | 483 | $wordCount = $result->getWordCount(); |
460 | 484 | $timestamp = $result->getTimestamp(); |
461 | | - $size = wfMsgExt( 'search-result-size', array( 'parsemag', 'escape' ), |
462 | | - $this->sk->formatSize( $byteSize ), $wordCount ); |
| 485 | + $size = wfMsgExt( |
| 486 | + 'search-result-size', |
| 487 | + array( 'parsemag', 'escape' ), |
| 488 | + $this->sk->formatSize( $byteSize ), |
| 489 | + $wordCount |
| 490 | + ); |
463 | 491 | $date = $wgLang->timeanddate( $timestamp ); |
464 | 492 | |
465 | 493 | // link to related articles if supported |
466 | 494 | $related = ''; |
467 | 495 | if( $result->hasRelated() ) { |
468 | 496 | $st = SpecialPage::getTitleFor( 'Search' ); |
469 | | - $stParams = wfArrayToCGI( $this->powerSearchOptions(), |
470 | | - array('search' => wfMsgForContent('searchrelated').':'.$t->getPrefixedText(), |
471 | | - 'fulltext' => wfMsg('search') )); |
| 497 | + $stParams = array_merge( |
| 498 | + $this->powerSearchOptions(), |
| 499 | + array( |
| 500 | + 'search' => wfMsgForContent( 'searchrelated' ) . ':' . $t->getPrefixedText(), |
| 501 | + 'fulltext' => wfMsg( 'search' ) |
| 502 | + ) |
| 503 | + ); |
472 | 504 | |
473 | | - $related = ' -- ' . $sk->makeKnownLinkObj( $st, |
474 | | - wfMsg('search-relatedarticle'), $stParams ); |
| 505 | + $related = ' -- ' . $sk->linkKnown( |
| 506 | + $st, |
| 507 | + wfMsg('search-relatedarticle'), |
| 508 | + array(), |
| 509 | + $stParams |
| 510 | + ); |
475 | 511 | } |
476 | 512 | |
477 | 513 | // Include a thumbnail for media files... |
— | — | @@ -567,16 +603,25 @@ |
568 | 604 | |
569 | 605 | $t = $result->getTitle(); |
570 | 606 | |
571 | | - $link = $this->sk->makeKnownLinkObj( $t, $result->getTitleSnippet($terms)); |
| 607 | + $link = $this->sk->linkKnown( |
| 608 | + $t, |
| 609 | + $result->getTitleSnippet($terms) |
| 610 | + ); |
572 | 611 | |
573 | 612 | // format redirect if any |
574 | 613 | $redirectTitle = $result->getRedirectTitle(); |
575 | 614 | $redirectText = $result->getRedirectSnippet($terms); |
576 | 615 | $redirect = ''; |
577 | 616 | if( !is_null($redirectTitle) ) |
578 | | - $redirect = "<span class='searchalttitle'>" |
579 | | - .wfMsg('search-redirect',$this->sk->makeKnownLinkObj( $redirectTitle, $redirectText)) |
580 | | - ."</span>"; |
| 617 | + $redirect = "<span class='searchalttitle'>" . |
| 618 | + wfMsg( |
| 619 | + 'search-redirect', |
| 620 | + $this->sk->linkKnown( |
| 621 | + $redirectTitle, |
| 622 | + $redirectText |
| 623 | + ) |
| 624 | + ) . |
| 625 | + "</span>"; |
581 | 626 | |
582 | 627 | $out = ""; |
583 | 628 | // display project name |
— | — | @@ -592,8 +637,15 @@ |
593 | 638 | } |
594 | 639 | // "more results" link (special page stuff could be localized, but we might not know target lang) |
595 | 640 | $searchTitle = Title::newFromText($t->getInterwiki().":Special:Search"); |
596 | | - $searchLink = $this->sk->makeKnownLinkObj( $searchTitle, wfMsg('search-interwiki-more'), |
597 | | - wfArrayToCGI(array('search' => $query, 'fulltext' => 'Search'))); |
| 641 | + $searchLink = $this->sk->linkKnown( |
| 642 | + $searchTitle, |
| 643 | + wfMsg('search-interwiki-more'), |
| 644 | + array(), |
| 645 | + array( |
| 646 | + 'search' => $query, |
| 647 | + 'fulltext' => 'Search' |
| 648 | + ) |
| 649 | + ); |
598 | 650 | $out .= "</ul><div class='mw-search-interwiki-project'><span class='mw-search-interwiki-more'> |
599 | 651 | {$searchLink}</span>{$caption}</div>\n<ul>"; |
600 | 652 | } |
— | — | @@ -801,13 +853,23 @@ |
802 | 854 | $opt['redirs'] = $this->searchRedirects ? 1 : 0; |
803 | 855 | |
804 | 856 | $st = SpecialPage::getTitleFor( 'Search' ); |
805 | | - $stParams = wfArrayToCGI( array( 'search' => $term, 'fulltext' => wfMsg( 'search' ) ), $opt ); |
| 857 | + $stParams = array_merge( |
| 858 | + array( |
| 859 | + 'search' => $term, |
| 860 | + 'fulltext' => wfMsg( 'search' ) |
| 861 | + ), |
| 862 | + $opt |
| 863 | + ); |
806 | 864 | |
807 | | - return Xml::element( 'a', |
808 | | - array( 'href'=> $st->getLocalURL( $stParams ), 'title' => $tooltip, |
809 | | - 'onmousedown' => 'mwSearchHeaderClick(this);', |
810 | | - 'onkeydown' => 'mwSearchHeaderClick(this);'), |
811 | | - $label ); |
| 865 | + return Xml::element( |
| 866 | + 'a', |
| 867 | + array( |
| 868 | + 'href' => $st->getLocalURL( $stParams ), |
| 869 | + 'title' => $tooltip, |
| 870 | + 'onmousedown' => 'mwSearchHeaderClick(this);', |
| 871 | + 'onkeydown' => 'mwSearchHeaderClick(this);'), |
| 872 | + $label |
| 873 | + ); |
812 | 874 | } |
813 | 875 | |
814 | 876 | /** Check if query starts with image: prefix */ |
— | — | @@ -929,7 +991,7 @@ |
930 | 992 | wfRunHooks( 'SpecialSearchNogomatch', array( &$t ) ); |
931 | 993 | # If the feature is enabled, go straight to the edit page |
932 | 994 | if ( $wgGoToEdit ) { |
933 | | - $wgOut->redirect( $t->getFullURL( 'action=edit' ) ); |
| 995 | + $wgOut->redirect( $t->getFullURL( array( 'action' => 'edit' ) ) ); |
934 | 996 | return; |
935 | 997 | } |
936 | 998 | } |
— | — | @@ -974,14 +1036,17 @@ |
975 | 1037 | $didYouMeanParams = array( 'search' => $textMatches->getSuggestionQuery() ); |
976 | 1038 | if($this->fulltext != NULL) |
977 | 1039 | $didYouMeanParams['fulltext'] = $this->fulltext; |
978 | | - $stParams = wfArrayToCGI( |
| 1040 | + $stParams = array_merge( |
979 | 1041 | $didYouMeanParams, |
980 | 1042 | $this->powerSearchOptions() |
981 | 1043 | ); |
982 | 1044 | |
983 | | - $suggestLink = $sk->makeKnownLinkObj( $st, |
| 1045 | + $suggestLink = $sk->linkKnown( |
| 1046 | + $st, |
984 | 1047 | $textMatches->getSuggestionSnippet(), |
985 | | - $stParams ); |
| 1048 | + array(), |
| 1049 | + $stParams |
| 1050 | + ); |
986 | 1051 | |
987 | 1052 | $wgOut->addHTML('<div class="searchdidyoumean">'.wfMsg('search-suggest',$suggestLink).'</div>'); |
988 | 1053 | } |
— | — | @@ -1208,7 +1273,10 @@ |
1209 | 1274 | $t = $result->getTitle(); |
1210 | 1275 | $sk = $wgUser->getSkin(); |
1211 | 1276 | |
1212 | | - $link = $sk->makeKnownLinkObj( $t, $result->getTitleSnippet($terms)); |
| 1277 | + $link = $sk->linkKnown( |
| 1278 | + $t, |
| 1279 | + $result->getTitleSnippet($terms) |
| 1280 | + ); |
1213 | 1281 | |
1214 | 1282 | //If page content is not readable, just return the title. |
1215 | 1283 | //This is not quite safe, but better than showing excerpts from non-readable pages |
— | — | @@ -1234,14 +1302,26 @@ |
1235 | 1303 | $sectionText = $result->getSectionSnippet($terms); |
1236 | 1304 | $redirect = ''; |
1237 | 1305 | if( !is_null($redirectTitle) ) |
1238 | | - $redirect = "<span class='searchalttitle'>" |
1239 | | - .wfMsg('search-redirect',$sk->makeKnownLinkObj( $redirectTitle, $redirectText)) |
1240 | | - ."</span>"; |
| 1306 | + $redirect = "<span class='searchalttitle'>" . |
| 1307 | + wfMsg( |
| 1308 | + 'search-redirect', |
| 1309 | + $sk->linkKnown( |
| 1310 | + $redirectTitle, |
| 1311 | + $redirectText |
| 1312 | + ) |
| 1313 | + ) . |
| 1314 | + "</span>"; |
1241 | 1315 | $section = ''; |
1242 | 1316 | if( !is_null($sectionTitle) ) |
1243 | | - $section = "<span class='searchalttitle'>" |
1244 | | - .wfMsg('search-section', $sk->makeKnownLinkObj( $sectionTitle, $sectionText)) |
1245 | | - ."</span>"; |
| 1317 | + $section = "<span class='searchalttitle'>" . |
| 1318 | + wfMsg( |
| 1319 | + 'search-section', |
| 1320 | + $sk->linkKnown( |
| 1321 | + $sectionTitle, |
| 1322 | + $sectionText |
| 1323 | + ) |
| 1324 | + ) . |
| 1325 | + "</span>"; |
1246 | 1326 | |
1247 | 1327 | // format text extract |
1248 | 1328 | $extract = "<div class='searchresult'>".$result->getTextSnippet($terms)."</div>"; |
— | — | @@ -1269,12 +1349,20 @@ |
1270 | 1350 | $related = ''; |
1271 | 1351 | if( $result->hasRelated() ){ |
1272 | 1352 | $st = SpecialPage::getTitleFor( 'Search' ); |
1273 | | - $stParams = wfArrayToCGI( $this->powerSearchOptions(), |
1274 | | - array('search' => wfMsgForContent('searchrelated').':'.$t->getPrefixedText(), |
1275 | | - 'fulltext' => wfMsg('search') )); |
| 1353 | + $stParams = array_merge( |
| 1354 | + $this->powerSearchOptions(), |
| 1355 | + array( |
| 1356 | + 'search' => wfMsgForContent( 'searchrelated' ) . ':' . $t->getPrefixedText(), |
| 1357 | + 'fulltext' => wfMsg( 'search' ) |
| 1358 | + ) |
| 1359 | + ); |
1276 | 1360 | |
1277 | | - $related = ' -- ' . $sk->makeKnownLinkObj( $st, |
1278 | | - wfMsg('search-relatedarticle'), $stParams ); |
| 1361 | + $related = ' -- ' . $sk->linkKnown( |
| 1362 | + $st, |
| 1363 | + wfMsg('search-relatedarticle'), |
| 1364 | + array(), |
| 1365 | + $stParams |
| 1366 | + ); |
1279 | 1367 | } |
1280 | 1368 | |
1281 | 1369 | // Include a thumbnail for media files... |
— | — | @@ -1375,16 +1463,25 @@ |
1376 | 1464 | $t = $result->getTitle(); |
1377 | 1465 | $sk = $wgUser->getSkin(); |
1378 | 1466 | |
1379 | | - $link = $sk->makeKnownLinkObj( $t, $result->getTitleSnippet($terms)); |
| 1467 | + $link = $sk->linkKnown( |
| 1468 | + $t, |
| 1469 | + $result->getTitleSnippet( $terms ) |
| 1470 | + ); |
1380 | 1471 | |
1381 | 1472 | // format redirect if any |
1382 | 1473 | $redirectTitle = $result->getRedirectTitle(); |
1383 | 1474 | $redirectText = $result->getRedirectSnippet($terms); |
1384 | 1475 | $redirect = ''; |
1385 | 1476 | if( !is_null($redirectTitle) ) |
1386 | | - $redirect = "<span class='searchalttitle'>" |
1387 | | - .wfMsg('search-redirect',$sk->makeKnownLinkObj( $redirectTitle, $redirectText)) |
1388 | | - ."</span>"; |
| 1477 | + $redirect = "<span class='searchalttitle'>" . |
| 1478 | + wfMsg( |
| 1479 | + 'search-redirect', |
| 1480 | + $sk->linkKnown( |
| 1481 | + $redirectTitle, |
| 1482 | + $redirectText |
| 1483 | + ) |
| 1484 | + ) . |
| 1485 | + "</span>"; |
1389 | 1486 | |
1390 | 1487 | $out = ""; |
1391 | 1488 | // display project name |
— | — | @@ -1400,8 +1497,15 @@ |
1401 | 1498 | } |
1402 | 1499 | // "more results" link (special page stuff could be localized, but we might not know target lang) |
1403 | 1500 | $searchTitle = Title::newFromText($t->getInterwiki().":Special:Search"); |
1404 | | - $searchLink = $sk->makeKnownLinkObj( $searchTitle, wfMsg('search-interwiki-more'), |
1405 | | - wfArrayToCGI(array('search' => $query, 'fulltext' => 'Search'))); |
| 1501 | + $searchLink = $sk->linkKnown( |
| 1502 | + $searchTitle, |
| 1503 | + wfMsg( 'search-interwiki-more' ), |
| 1504 | + array(), |
| 1505 | + array( |
| 1506 | + 'search' => $query, |
| 1507 | + 'fulltext' => 'Search' |
| 1508 | + ) |
| 1509 | + ); |
1406 | 1510 | $out .= "</ul><div class='mw-search-interwiki-project'><span class='mw-search-interwiki-more'>{$searchLink}</span>{$caption}</div>\n<ul>"; |
1407 | 1511 | } |
1408 | 1512 | |
Index: trunk/phase3/includes/specials/SpecialProtectedpages.php |
— | — | @@ -95,12 +95,23 @@ |
96 | 96 | |
97 | 97 | # Show a link to the change protection form for allowed users otherwise a link to the protection log |
98 | 98 | if( $wgUser->isAllowed( 'protect' ) ) { |
99 | | - $changeProtection = ' (' . $skin->makeKnownLinkObj( $title, wfMsgHtml( 'protect_change' ), |
100 | | - 'action=unprotect' ) . ')'; |
| 99 | + $changeProtection = ' (' . $skin->linkKnown( |
| 100 | + $title, |
| 101 | + wfMsgHtml( 'protect_change' ), |
| 102 | + array(), |
| 103 | + array( 'action' => 'unprotect' ) |
| 104 | + ) . ')'; |
101 | 105 | } else { |
102 | 106 | $ltitle = SpecialPage::getTitleFor( 'Log' ); |
103 | | - $changeProtection = ' (' . $skin->makeKnownLinkObj( $ltitle, wfMsgHtml( 'protectlogpage' ), |
104 | | - 'type=protect&page=' . $title->getPrefixedUrl() ) . ')'; |
| 107 | + $changeProtection = ' (' . $skin->linkKnown( |
| 108 | + $ltitle, |
| 109 | + wfMsgHtml( 'protectlogpage' ), |
| 110 | + array(), |
| 111 | + array( |
| 112 | + 'type' => 'protect', |
| 113 | + 'page' => $title->getPrefixedUrl() |
| 114 | + ) |
| 115 | + ) . ')'; |
105 | 116 | } |
106 | 117 | |
107 | 118 | wfProfileOut( __METHOD__ ); |
— | — | @@ -223,6 +234,7 @@ |
224 | 235 | |
225 | 236 | // First pass to load the log names |
226 | 237 | foreach( $wgRestrictionLevels as $type ) { |
| 238 | + // Messages used can be 'restriction-level-sysop' and 'restriction-level-autoconfirmed' |
227 | 239 | if( $type !='' && $type !='*') { |
228 | 240 | $text = wfMsg("restriction-level-$type"); |
229 | 241 | $m[$text] = $type; |
Index: trunk/phase3/includes/specials/SpecialMostlinked.php |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | */ |
64 | 64 | function makeWlhLink( &$title, $caption, &$skin ) { |
65 | 65 | $wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedDBkey() ); |
66 | | - return $skin->makeKnownLinkObj( $wlh, $caption ); |
| 66 | + return $skin->linkKnown( $wlh, $caption ); |
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
Index: trunk/phase3/includes/specials/SpecialLinkSearch.php |
— | — | @@ -151,7 +151,7 @@ |
152 | 152 | function formatResult( $skin, $result ) { |
153 | 153 | $title = Title::makeTitle( $result->namespace, $result->title ); |
154 | 154 | $url = $result->url; |
155 | | - $pageLink = $skin->makeKnownLinkObj( $title ); |
| 155 | + $pageLink = $skin->linkKnown( $title ); |
156 | 156 | $urlLink = $skin->makeExternalLink( $url, $url ); |
157 | 157 | |
158 | 158 | return wfMsgHtml( 'linksearch-line', $urlLink, $pageLink ); |
Index: trunk/phase3/includes/specials/SpecialBrokenRedirects.php |
— | — | @@ -64,15 +64,30 @@ |
65 | 65 | return '<s>' . $skin->link( $fromObj ) . '</s>'; |
66 | 66 | } |
67 | 67 | |
68 | | - $from = $skin->makeKnownLinkObj( $fromObj ,'', 'redirect=no' ); |
69 | | - $edit = $skin->makeKnownLinkObj( $fromObj, wfMsgHtml( 'brokenredirects-edit' ), 'action=edit' ); |
| 68 | + $from = $skin->linkKnown( |
| 69 | + $fromObj, |
| 70 | + null, |
| 71 | + array(), |
| 72 | + array( 'redirect' => 'no' ) |
| 73 | + ); |
| 74 | + $edit = $skin->linkKnown( |
| 75 | + $fromObj, |
| 76 | + wfMsgHtml( 'brokenredirects-edit' ), |
| 77 | + array(), |
| 78 | + array( 'action' => 'edit' ) |
| 79 | + ); |
70 | 80 | $to = $skin->makeBrokenLinkObj( $toObj ); |
71 | 81 | $arr = $wgContLang->getArrow(); |
72 | 82 | |
73 | 83 | $out = "{$from} {$edit}"; |
74 | 84 | |
75 | 85 | if( $wgUser->isAllowed( 'delete' ) ) { |
76 | | - $delete = $skin->makeKnownLinkObj( $fromObj, wfMsgHtml( 'brokenredirects-delete' ), 'action=delete' ); |
| 86 | + $delete = $skin->linkKnown( |
| 87 | + $fromObj, |
| 88 | + wfMsgHtml( 'brokenredirects-delete' ), |
| 89 | + array(), |
| 90 | + array( 'action' => 'delete' ) |
| 91 | + ); |
77 | 92 | $out .= " {$delete}"; |
78 | 93 | } |
79 | 94 | |
Index: trunk/phase3/includes/specials/SpecialWatchlist.php |
— | — | @@ -21,8 +21,12 @@ |
22 | 22 | # Anons don't get a watchlist |
23 | 23 | if( $wgUser->isAnon() ) { |
24 | 24 | $wgOut->setPageTitle( wfMsg( 'watchnologin' ) ); |
25 | | - $llink = $skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Userlogin' ), |
26 | | - wfMsgHtml( 'loginreqlink' ), 'returnto=' . $specialTitle->getPrefixedUrl() ); |
| 25 | + $llink = $skin->linkKnown( |
| 26 | + SpecialPage::getTitleFor( 'Userlogin' ), |
| 27 | + wfMsgHtml( 'loginreqlink' ), |
| 28 | + array(), |
| 29 | + array( 'returnto' => $specialTitle->getPrefixedUrl() ) |
| 30 | + ); |
27 | 31 | $wgOut->addHTML( wfMsgWikiHtml( 'watchlistanontext', $llink ) ); |
28 | 32 | return; |
29 | 33 | } |
— | — | @@ -256,34 +260,100 @@ |
257 | 261 | $hideLinktext = wfMsgHtml( 'hide' ); |
258 | 262 | # Hide/show minor edits |
259 | 263 | $label = $hideMinor ? $showLinktext : $hideLinktext; |
260 | | - $linkBits = wfArrayToCGI( array( 'hideMinor' => 1 - (int)$hideMinor ), $nondefaults ); |
261 | | - $links[] = wfMsgHtml( 'rcshowhideminor', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) ); |
| 264 | + $linkBits = array_merge( |
| 265 | + array( 'hideMinor' => 1 - (int)$hideMinor ), |
| 266 | + $nondefaults |
| 267 | + ); |
| 268 | + $links[] = wfMsgHtml( |
| 269 | + 'rcshowhideminor', |
| 270 | + $skin->linkKnown( |
| 271 | + $thisTitle, |
| 272 | + $label, |
| 273 | + array(), |
| 274 | + $linkBits |
| 275 | + ) |
| 276 | + ); |
262 | 277 | |
263 | 278 | # Hide/show bot edits |
264 | 279 | $label = $hideBots ? $showLinktext : $hideLinktext; |
265 | | - $linkBits = wfArrayToCGI( array( 'hideBots' => 1 - (int)$hideBots ), $nondefaults ); |
266 | | - $links[] = wfMsgHtml( 'rcshowhidebots', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) ); |
| 280 | + $linkBits = array_merge( |
| 281 | + array( 'hideBots' => 1 - (int)$hideBots ), |
| 282 | + $nondefaults |
| 283 | + ); |
| 284 | + $links[] = wfMsgHtml( |
| 285 | + 'rcshowhidebots', |
| 286 | + $skin->linkKnown( |
| 287 | + $thisTitle, |
| 288 | + $label, |
| 289 | + array(), |
| 290 | + $linkBits |
| 291 | + ) |
| 292 | + ); |
267 | 293 | |
268 | 294 | # Hide/show anonymous edits |
269 | 295 | $label = $hideAnons ? $showLinktext : $hideLinktext; |
270 | | - $linkBits = wfArrayToCGI( array( 'hideAnons' => 1 - (int)$hideAnons ), $nondefaults ); |
271 | | - $links[] = wfMsgHtml( 'rcshowhideanons', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) ); |
| 296 | + $linkBits = array_merge( |
| 297 | + array( 'hideAnons' => 1 - (int)$hideAnons ), |
| 298 | + $nondefaults |
| 299 | + ); |
| 300 | + $links[] = wfMsgHtml( |
| 301 | + 'rcshowhideanons', |
| 302 | + $skin->linkKnown( |
| 303 | + $thisTitle, |
| 304 | + $label, |
| 305 | + array(), |
| 306 | + $linkBits |
| 307 | + ) |
| 308 | + ); |
272 | 309 | |
273 | 310 | # Hide/show logged in edits |
274 | 311 | $label = $hideLiu ? $showLinktext : $hideLinktext; |
275 | | - $linkBits = wfArrayToCGI( array( 'hideLiu' => 1 - (int)$hideLiu ), $nondefaults ); |
276 | | - $links[] = wfMsgHtml( 'rcshowhideliu', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) ); |
| 312 | + $linkBits = array_merge( |
| 313 | + array( 'hideLiu' => 1 - (int)$hideLiu ), |
| 314 | + $nondefaults |
| 315 | + ); |
| 316 | + $links[] = wfMsgHtml( |
| 317 | + 'rcshowhideliu', |
| 318 | + $skin->linkKnown( |
| 319 | + $thisTitle, |
| 320 | + $label, |
| 321 | + array(), |
| 322 | + $linkBits |
| 323 | + ) |
| 324 | + ); |
277 | 325 | |
278 | 326 | # Hide/show own edits |
279 | 327 | $label = $hideOwn ? $showLinktext : $hideLinktext; |
280 | | - $linkBits = wfArrayToCGI( array( 'hideOwn' => 1 - (int)$hideOwn ), $nondefaults ); |
281 | | - $links[] = wfMsgHtml( 'rcshowhidemine', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) ); |
| 328 | + $linkBits = array_merge( |
| 329 | + array( 'hideOwn' => 1 - (int)$hideOwn ), |
| 330 | + $nondefaults |
| 331 | + ); |
| 332 | + $links[] = wfMsgHtml( |
| 333 | + 'rcshowhidemine', |
| 334 | + $skin->linkKnown( |
| 335 | + $thisTitle, |
| 336 | + $label, |
| 337 | + array(), |
| 338 | + $linkBits |
| 339 | + ) |
| 340 | + ); |
282 | 341 | |
283 | 342 | # Hide/show patrolled edits |
284 | 343 | if( $wgUser->useRCPatrol() ) { |
285 | 344 | $label = $hidePatrolled ? $showLinktext : $hideLinktext; |
286 | | - $linkBits = wfArrayToCGI( array( 'hidePatrolled' => 1 - (int)$hidePatrolled ), $nondefaults ); |
287 | | - $links[] = wfMsgHtml( 'rcshowhidepatr', $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ) ); |
| 345 | + $linkBits = array_merge( |
| 346 | + array( 'hidePatrolled' => 1 - (int)$hidePatrolled ), |
| 347 | + $nondefaults |
| 348 | + ); |
| 349 | + $links[] = wfMsgHtml( |
| 350 | + 'rcshowhidepatr', |
| 351 | + $skin->linkKnown( |
| 352 | + $thisTitle, |
| 353 | + $label, |
| 354 | + array(), |
| 355 | + $linkBits |
| 356 | + ) |
| 357 | + ); |
288 | 358 | } |
289 | 359 | |
290 | 360 | # Namespace filter and put the whole form together. |
Index: trunk/phase3/includes/specials/SpecialImport.php |
— | — | @@ -136,7 +136,7 @@ |
137 | 137 | if( !$wgUser->isAllowed( 'import' ) && !$wgUser->isAllowed( 'importupload' ) ) |
138 | 138 | return $wgOut->permissionRequired( 'import' ); |
139 | 139 | |
140 | | - $action = $this->getTitle()->getLocalUrl( 'action=submit' ); |
| 140 | + $action = $this->getTitle()->getLocalUrl( array( 'action' => 'submit' ) ); |
141 | 141 | |
142 | 142 | if( $wgUser->isAllowed( 'importupload' ) ) { |
143 | 143 | $wgOut->addWikiMsg( "importtext" ); |
— | — | @@ -273,7 +273,7 @@ |
274 | 274 | * @ingroup SpecialPage |
275 | 275 | */ |
276 | 276 | class ImportReporter { |
277 | | - private $reason=false; |
| 277 | + private $reason=false; |
278 | 278 | |
279 | 279 | function __construct( $importer, $upload, $interwiki , $reason=false ) { |
280 | 280 | $importer->setPageOutCallback( array( $this, 'reportPage' ) ); |
— | — | @@ -299,7 +299,7 @@ |
300 | 300 | $contentCount = $wgContLang->formatNum( $successCount ); |
301 | 301 | |
302 | 302 | if( $successCount > 0 ) { |
303 | | - $wgOut->addHTML( "<li>" . $skin->makeKnownLinkObj( $title ) . " " . |
| 303 | + $wgOut->addHTML( "<li>" . $skin->linkKnown( $title ) . " " . |
304 | 304 | wfMsgExt( 'import-revision-count', array( 'parsemag', 'escape' ), $localCount ) . |
305 | 305 | "</li>\n" |
306 | 306 | ); |
— | — | @@ -309,7 +309,7 @@ |
310 | 310 | $detail = wfMsgExt( 'import-logentry-upload-detail', array( 'content', 'parsemag' ), |
311 | 311 | $contentCount ); |
312 | 312 | if ( $this->reason ) { |
313 | | - $detail .= wfMsgForContent( 'colon-separator' ) . $this->reason; |
| 313 | + $detail .= wfMsgForContent( 'colon-separator' ) . $this->reason; |
314 | 314 | } |
315 | 315 | $log->addEntry( 'upload', $title, $detail ); |
316 | 316 | } else { |
— | — | @@ -318,7 +318,7 @@ |
319 | 319 | $detail = wfMsgExt( 'import-logentry-interwiki-detail', array( 'content', 'parsemag' ), |
320 | 320 | $contentCount, $interwiki ); |
321 | 321 | if ( $this->reason ) { |
322 | | - $detail .= wfMsgForContent( 'colon-separator' ) . $this->reason; |
| 322 | + $detail .= wfMsgForContent( 'colon-separator' ) . $this->reason; |
323 | 323 | } |
324 | 324 | $log->addEntry( 'interwiki', $title, $detail ); |
325 | 325 | } |
Index: trunk/phase3/includes/specials/SpecialPrefixindex.php |
— | — | @@ -136,7 +136,10 @@ |
137 | 137 | $t = Title::makeTitle( $s->page_namespace, $s->page_title ); |
138 | 138 | if( $t ) { |
139 | 139 | $link = ($s->page_is_redirect ? '<div class="allpagesredirect">' : '' ) . |
140 | | - $sk->makeKnownLinkObj( $t, htmlspecialchars( $t->getText() ), false, false ) . |
| 140 | + $sk->linkKnown( |
| 141 | + $t, |
| 142 | + htmlspecialchars( $t->getText() ) |
| 143 | + ) . |
141 | 144 | ($s->page_is_redirect ? '</div>' : '' ); |
142 | 145 | } else { |
143 | 146 | $link = '[[' . htmlspecialchars( $s->page_title ) . ']]'; |
— | — | @@ -170,17 +173,26 @@ |
171 | 174 | $nsForm . |
172 | 175 | '</td> |
173 | 176 | <td id="mw-prefixindex-nav-form">' . |
174 | | - $sk->makeKnownLinkObj( $self, wfMsgHtml( 'allpages' ) ); |
| 177 | + $sk->linkKnown( $self, wfMsgHtml( 'allpages' ) ); |
175 | 178 | |
176 | 179 | if( isset( $res ) && $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) { |
177 | | - $namespaceparam = $namespace ? "&namespace=$namespace" : ""; |
| 180 | + $query = array( |
| 181 | + 'from' => $s->page_title, |
| 182 | + 'prefix' => $prefix |
| 183 | + ); |
| 184 | + |
| 185 | + if( $namespace ) { |
| 186 | + $query['namespace'] = $namespace; |
| 187 | + } |
| 188 | + |
178 | 189 | $out2 = $wgLang->pipeList( array( |
179 | 190 | $out2, |
180 | | - $sk->makeKnownLinkObj( |
| 191 | + $sk->linkKnown( |
181 | 192 | $self, |
182 | 193 | wfMsgHtml( 'nextpage', str_replace( '_',' ', htmlspecialchars( $s->page_title ) ) ), |
183 | | - "from=" . wfUrlEncode( $s->page_title ) . |
184 | | - "&prefix=" . wfUrlEncode( $prefix ) . $namespaceparam ) |
| 194 | + array(), |
| 195 | + $query |
| 196 | + ) |
185 | 197 | ) ); |
186 | 198 | } |
187 | 199 | $out2 .= "</td></tr>" . |
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php |
— | — | @@ -126,23 +126,41 @@ |
127 | 127 | $undelete = SpecialPage::getTitleFor( 'Undelete' ); |
128 | 128 | |
129 | 129 | $logs = SpecialPage::getTitleFor( 'Log' ); |
130 | | - $dellog = $sk->makeKnownLinkObj( $logs, |
| 130 | + $dellog = $sk->linkKnown( |
| 131 | + $logs, |
131 | 132 | $this->messages['deletionlog'], |
132 | | - 'type=delete&page=' . $page->getPrefixedUrl() ); |
| 133 | + array(), |
| 134 | + array( |
| 135 | + 'type' => 'delete', |
| 136 | + 'page' => $page->getPrefixedUrl() |
| 137 | + ) |
| 138 | + ); |
133 | 139 | |
134 | | - $reviewlink = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Undelete', $page->getPrefixedDBkey() ), |
135 | | - $this->messages['undeletebtn'] ); |
| 140 | + $reviewlink = $sk->linkKnown( |
| 141 | + SpecialPage::getTitleFor( 'Undelete', $page->getPrefixedDBkey() ), |
| 142 | + $this->messages['undeletebtn'] |
| 143 | + ); |
136 | 144 | |
137 | | - $link = $sk->makeKnownLinkObj( $undelete, |
| 145 | + $link = $sk->linkKnown( |
| 146 | + $undelete, |
138 | 147 | htmlspecialchars( $page->getPrefixedText() ), |
139 | | - 'target=' . $page->getPrefixedUrl() . |
140 | | - '×tamp=' . $rev->getTimestamp() ); |
| 148 | + array(), |
| 149 | + array( |
| 150 | + 'target' => $page->getPrefixedUrl(), |
| 151 | + 'timestamp' => $rev->getTimestamp() |
| 152 | + ) |
| 153 | + ); |
141 | 154 | |
142 | | - $last = $sk->makeKnownLinkObj( $undelete, |
| 155 | + $last = $sk->linkKnown( |
| 156 | + $undelete, |
143 | 157 | $this->messages['diff'], |
144 | | - "target=" . $page->getPrefixedUrl() . |
145 | | - "×tamp=" . $rev->getTimestamp() . |
146 | | - "&diff=prev" ); |
| 158 | + array(), |
| 159 | + array( |
| 160 | + 'target' => $page->getPrefixedUrl(), |
| 161 | + 'timestamp' => $rev->getTimestamp(), |
| 162 | + 'diff' => 'prev' |
| 163 | + ) |
| 164 | + ); |
147 | 165 | |
148 | 166 | $comment = $sk->revComment( $rev ); |
149 | 167 | $d = htmlspecialchars( $wgLang->timeanddate( $rev->getTimestamp(), true ) ); |
— | — | @@ -150,9 +168,15 @@ |
151 | 169 | if( $rev->isDeleted( Revision::DELETED_TEXT ) ) { |
152 | 170 | $d = '<span class="history-deleted">' . $d . '</span>'; |
153 | 171 | } else { |
154 | | - $link = $sk->makeKnownLinkObj( $undelete, $d, |
155 | | - 'target=' . $page->getPrefixedUrl() . |
156 | | - '×tamp=' . $rev->getTimestamp() ); |
| 172 | + $link = $sk->linkKnown( |
| 173 | + $undelete, |
| 174 | + $d, |
| 175 | + array(), |
| 176 | + array( |
| 177 | + 'target' => $page->getPrefixedUrl(), |
| 178 | + 'timestamp' => $rev->getTimestamp() |
| 179 | + ) |
| 180 | + ); |
157 | 181 | } |
158 | 182 | |
159 | 183 | $pagelink = $sk->link( $page ); |
— | — | @@ -312,19 +336,34 @@ |
313 | 337 | if( ( $id != 0 && $wgSysopUserBans ) || ( $id == 0 && User::isIP( $nt->getText() ) ) ) { |
314 | 338 | # Block link |
315 | 339 | if( $wgUser->isAllowed( 'block' ) ) |
316 | | - $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ), |
317 | | - wfMsgHtml( 'blocklink' ) ); |
| 340 | + $tools[] = $sk->linkKnown( |
| 341 | + SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ), |
| 342 | + wfMsgHtml( 'blocklink' ) |
| 343 | + ); |
318 | 344 | # Block log link |
319 | | - $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Log' ), |
320 | | - wfMsgHtml( 'sp-contributions-blocklog' ), 'type=block&page=' . $nt->getPrefixedUrl() ); |
| 345 | + $tools[] = $sk->linkKnown( |
| 346 | + SpecialPage::getTitleFor( 'Log' ), |
| 347 | + wfMsgHtml( 'sp-contributions-blocklog' ), |
| 348 | + array(), |
| 349 | + array( |
| 350 | + 'type' => 'block', |
| 351 | + 'page' => $nt->getPrefixedUrl() |
| 352 | + ) |
| 353 | + ); |
321 | 354 | } |
322 | 355 | # Other logs link |
323 | | - $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Log' ), |
324 | | - wfMsgHtml( 'sp-contributions-logs' ), 'user=' . $nt->getPartialUrl() ); |
| 356 | + $tools[] = $sk->linkKnown( |
| 357 | + SpecialPage::getTitleFor( 'Log' ), |
| 358 | + wfMsgHtml( 'sp-contributions-logs' ), |
| 359 | + array(), |
| 360 | + array( 'user' => $nt->getPartialUrl() ) |
| 361 | + ); |
325 | 362 | # Link to undeleted contributions |
326 | | - $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Contributions', $nt->getDBkey() ), |
327 | | - wfMsgHtml( 'contributions' ) ); |
328 | | - |
| 363 | + $tools[] = $sk->linkKnown( |
| 364 | + SpecialPage::getTitleFor( 'Contributions', $nt->getDBkey() ), |
| 365 | + wfMsgHtml( 'contributions' ) |
| 366 | + ); |
| 367 | + |
329 | 368 | wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) ); |
330 | 369 | |
331 | 370 | $links = $wgLang->pipeList( $tools ); |
Index: trunk/phase3/includes/specials/SpecialAncientpages.php |
— | — | @@ -56,7 +56,10 @@ |
57 | 57 | |
58 | 58 | $d = $wgLang->timeanddate( wfTimestamp( TS_MW, $result->value ), true ); |
59 | 59 | $title = Title::makeTitle( $result->namespace, $result->title ); |
60 | | - $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) ); |
| 60 | + $link = $skin->linkKnown( |
| 61 | + $title, |
| 62 | + htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) |
| 63 | + ); |
61 | 64 | return wfSpecialList($link, htmlspecialchars($d) ); |
62 | 65 | } |
63 | 66 | } |
Index: trunk/phase3/includes/specials/SpecialUnwatchedpages.php |
— | — | @@ -44,8 +44,16 @@ |
45 | 45 | $nt = Title::makeTitle( $result->namespace, $result->title ); |
46 | 46 | $text = $wgContLang->convert( $nt->getPrefixedText() ); |
47 | 47 | |
48 | | - $plink = $skin->makeKnownLinkObj( $nt, htmlspecialchars( $text ) ); |
49 | | - $wlink = $skin->makeKnownLinkObj( $nt, wfMsgHtml( 'watch' ), 'action=watch' ); |
| 48 | + $plink = $skin->linkKnown( |
| 49 | + $nt, |
| 50 | + htmlspecialchars( $text ) |
| 51 | + ); |
| 52 | + $wlink = $skin->linkKnown( |
| 53 | + $nt, |
| 54 | + wfMsgHtml( 'watch' ), |
| 55 | + array(), |
| 56 | + array( 'action' => 'watch' |
| 57 | + ); |
50 | 58 | |
51 | 59 | return wfSpecialList( $plink, $wlink ); |
52 | 60 | } |
Index: trunk/phase3/includes/specials/SpecialMovepage.php |
— | — | @@ -463,7 +463,7 @@ |
464 | 464 | # be longer than 255 characters. |
465 | 465 | $newSubpage = Title::makeTitleSafe( $newNs, $newPageName ); |
466 | 466 | if( !$newSubpage ) { |
467 | | - $oldLink = $skin->makeKnownLinkObj( $oldSubpage ); |
| 467 | + $oldLink = $skin->linkKnown( $oldSubpage ); |
468 | 468 | $extraOutput []= wfMsgHtml( 'movepage-page-unmoved', $oldLink, |
469 | 469 | htmlspecialchars(Title::makeName( $newNs, $newPageName ))); |
470 | 470 | continue; |
— | — | @@ -471,7 +471,7 @@ |
472 | 472 | |
473 | 473 | # This was copy-pasted from Renameuser, bleh. |
474 | 474 | if ( $newSubpage->exists() && !$oldSubpage->isValidMoveTarget( $newSubpage ) ) { |
475 | | - $link = $skin->makeKnownLinkObj( $newSubpage ); |
| 475 | + $link = $skin->linkKnown( $newSubpage ); |
476 | 476 | $extraOutput []= wfMsgHtml( 'movepage-page-exists', $link ); |
477 | 477 | } else { |
478 | 478 | $success = $oldSubpage->moveTo( $newSubpage, true, $this->reason, $createRedirect ); |
— | — | @@ -479,11 +479,16 @@ |
480 | 480 | if ( $this->fixRedirects ) { |
481 | 481 | DoubleRedirectJob::fixRedirects( 'move', $oldSubpage, $newSubpage ); |
482 | 482 | } |
483 | | - $oldLink = $skin->makeKnownLinkObj( $oldSubpage, '', 'redirect=no' ); |
484 | | - $newLink = $skin->makeKnownLinkObj( $newSubpage ); |
| 483 | + $oldLink = $skin->linkKnown( |
| 484 | + $oldSubpage, |
| 485 | + null, |
| 486 | + array(), |
| 487 | + array( 'redirect' => 'no' ) |
| 488 | + ); |
| 489 | + $newLink = $skin->linkKnown( $newSubpage ); |
485 | 490 | $extraOutput []= wfMsgHtml( 'movepage-page-moved', $oldLink, $newLink ); |
486 | 491 | } else { |
487 | | - $oldLink = $skin->makeKnownLinkObj( $oldSubpage ); |
| 492 | + $oldLink = $skin->linkKnown( $oldSubpage ); |
488 | 493 | $newLink = $skin->link( $newSubpage ); |
489 | 494 | $extraOutput []= wfMsgHtml( 'movepage-page-unmoved', $oldLink, $newLink ); |
490 | 495 | } |
Index: trunk/phase3/includes/specials/SpecialConfirmemail.php |
— | — | @@ -35,8 +35,12 @@ |
36 | 36 | } else { |
37 | 37 | $title = SpecialPage::getTitleFor( 'Userlogin' ); |
38 | 38 | $skin = $wgUser->getSkin(); |
39 | | - $llink = $skin->makeKnownLinkObj( $title, wfMsgHtml( 'loginreqlink' ), |
40 | | - 'returnto=' . $this->getTitle()->getPrefixedUrl() ); |
| 39 | + $llink = $skin->linkKnown( |
| 40 | + $title, |
| 41 | + wfMsgHtml( 'loginreqlink' ), |
| 42 | + array(), |
| 43 | + array( 'returnto' => $this->getTitle()->getPrefixedUrl() ) |
| 44 | + ); |
41 | 45 | $wgOut->addHTML( wfMsgWikiHtml( 'confirmemail_needlogin', $llink ) ); |
42 | 46 | } |
43 | 47 | } else { |
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php |
— | — | @@ -155,7 +155,7 @@ |
156 | 156 | $haveRevisions = $revisions && $revisions->getNumRows() > 0; |
157 | 157 | |
158 | 158 | $titleObj = SpecialPage::getTitleFor( "Mergehistory" ); |
159 | | - $action = $titleObj->getLocalURL( "action=submit" ); |
| 159 | + $action = $titleObj->getLocalURL( array( 'action' => 'submit' ) ); |
160 | 160 | # Start the form here |
161 | 161 | $top = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action, 'id' => 'merge' ) ); |
162 | 162 | $wgOut->addHTML( $top ); |
— | — | @@ -228,8 +228,12 @@ |
229 | 229 | $ts = wfTimestamp( TS_MW, $row->rev_timestamp ); |
230 | 230 | $checkBox = Xml::radio( "mergepoint", $ts, false ); |
231 | 231 | |
232 | | - $pageLink = $this->sk->makeKnownLinkObj( $rev->getTitle(), |
233 | | - htmlspecialchars( $wgLang->timeanddate( $ts ) ), 'oldid=' . $rev->getId() ); |
| 232 | + $pageLink = $this->sk->linkKnown( |
| 233 | + $rev->getTitle(), |
| 234 | + htmlspecialchars( $wgLang->timeanddate( $ts ) ), |
| 235 | + array(), |
| 236 | + array( 'oldid' => $rev->getId() ) |
| 237 | + ); |
234 | 238 | if( $rev->isDeleted( Revision::DELETED_TEXT ) ) { |
235 | 239 | $pageLink = '<span class="history-deleted">' . $pageLink . '</span>'; |
236 | 240 | } |
— | — | @@ -238,8 +242,15 @@ |
239 | 243 | if( !$rev->userCan( Revision::DELETED_TEXT ) ) |
240 | 244 | $last = $this->message['last']; |
241 | 245 | else if( isset($this->prevId[$row->rev_id]) ) |
242 | | - $last = $this->sk->makeKnownLinkObj( $rev->getTitle(), $this->message['last'], |
243 | | - "diff=" . $row->rev_id . "&oldid=" . $this->prevId[$row->rev_id] ); |
| 246 | + $last = $this->sk->linkKnown( |
| 247 | + $rev->getTitle(), |
| 248 | + $this->message['last'], |
| 249 | + array(), |
| 250 | + array( |
| 251 | + 'diff' => $row->rev_id, |
| 252 | + 'oldid' => $this->prevId[$row->rev_id] |
| 253 | + ) |
| 254 | + ); |
244 | 255 | |
245 | 256 | $userLink = $this->sk->revUserTools( $rev ); |
246 | 257 | |
— | — | @@ -261,8 +272,15 @@ |
262 | 273 | if( !$this->userCan($row, Revision::DELETED_TEXT) ) { |
263 | 274 | return '<span class="history-deleted">' . $wgLang->timeanddate( $ts, true ) . '</span>'; |
264 | 275 | } else { |
265 | | - $link = $this->sk->makeKnownLinkObj( $titleObj, |
266 | | - $wgLang->timeanddate( $ts, true ), "target=$target×tamp=$ts" ); |
| 276 | + $link = $this->sk->linkKnown( |
| 277 | + $titleObj, |
| 278 | + $wgLang->timeanddate( $ts, true ), |
| 279 | + array(), |
| 280 | + array( |
| 281 | + 'target' => $target, |
| 282 | + 'timestamp' => $ts |
| 283 | + ) |
| 284 | + ); |
267 | 285 | if( $this->isDeleted($row, Revision::DELETED_TEXT) ) |
268 | 286 | $link = '<span class="history-deleted">' . $link . '</span>'; |
269 | 287 | return $link; |
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php |
— | — | @@ -186,16 +186,28 @@ |
187 | 187 | if( $this->targetObj ) { |
188 | 188 | $links = array(); |
189 | 189 | $logtitle = SpecialPage::getTitleFor( 'Log' ); |
190 | | - $links[] = $this->skin->makeKnownLinkObj( $logtitle, wfMsgHtml( 'viewpagelogs' ), |
191 | | - wfArrayToCGI( array( 'page' => $this->targetObj->getPrefixedUrl() ) ) ); |
| 190 | + $links[] = $this->skin->linkKnown( |
| 191 | + $logtitle, |
| 192 | + wfMsgHtml( 'viewpagelogs' ), |
| 193 | + array(), |
| 194 | + array( 'page' => $this->targetObj->getPrefixedUrl() ) |
| 195 | + ); |
192 | 196 | # Give a link to the page history |
193 | | - $links[] = $this->skin->makeKnownLinkObj( $this->targetObj, wfMsgHtml( 'pagehist' ), |
194 | | - wfArrayToCGI( array( 'action' => 'history' ) ) ); |
| 197 | + $links[] = $this->skin->linkKnown( |
| 198 | + $this->targetObj, |
| 199 | + wfMsgHtml( 'pagehist' ), |
| 200 | + array(), |
| 201 | + array( 'action' => 'history' ) |
| 202 | + ); |
195 | 203 | # Link to deleted edits |
196 | 204 | if( $wgUser->isAllowed('undelete') ) { |
197 | 205 | $undelete = SpecialPage::getTitleFor( 'Undelete' ); |
198 | | - $links[] = $this->skin->makeKnownLinkObj( $undelete, wfMsgHtml( 'deletedhist' ), |
199 | | - wfArrayToCGI( array( 'target' => $this->targetObj->getPrefixedDBkey() ) ) ); |
| 206 | + $links[] = $this->skin->linkKnown( |
| 207 | + $undelete, |
| 208 | + wfMsgHtml( 'deletedhist' ), |
| 209 | + array(), |
| 210 | + array( 'target' => $this->targetObj->getPrefixedDBkey() ) |
| 211 | + ); |
200 | 212 | } |
201 | 213 | # Logs themselves don't have histories or archived revisions |
202 | 214 | $wgOut->setSubtitle( '<p>'.implode($links,' / ').'</p>' ); |
Index: trunk/phase3/includes/specials/SpecialUnusedtemplates.php |
— | — | @@ -33,11 +33,18 @@ |
34 | 34 | |
35 | 35 | function formatResult( $skin, $result ) { |
36 | 36 | $title = Title::makeTitle( NS_TEMPLATE, $result->title ); |
37 | | - $pageLink = $skin->makeKnownLinkObj( $title, '', 'redirect=no' ); |
38 | | - $wlhLink = $skin->makeKnownLinkObj( |
| 37 | + $pageLink = $skin->linkKnown( |
| 38 | + $title, |
| 39 | + null, |
| 40 | + array(), |
| 41 | + array( 'redirect' => 'no' ) |
| 42 | + ); |
| 43 | + $wlhLink = $skin->linkKnown( |
39 | 44 | SpecialPage::getTitleFor( 'Whatlinkshere' ), |
40 | 45 | wfMsgHtml( 'unusedtemplateswlh' ), |
41 | | - 'target=' . $title->getPrefixedUrl() ); |
| 46 | + array(), |
| 47 | + array( 'target' => $title->getPrefixedUrl() ) |
| 48 | + ); |
42 | 49 | return wfSpecialList( $pageLink, $wlhLink ); |
43 | 50 | } |
44 | 51 | |
Index: trunk/phase3/includes/specials/SpecialBlockip.php |
— | — | @@ -668,13 +668,21 @@ |
669 | 669 | */ |
670 | 670 | private function getUnblockLink( $skin ) { |
671 | 671 | $list = SpecialPage::getTitleFor( 'Ipblocklist' ); |
| 672 | + $query = array( 'action' => 'unblock' ); |
| 673 | + |
672 | 674 | if( $this->BlockAddress ) { |
673 | 675 | $addr = htmlspecialchars( strtr( $this->BlockAddress, '_', ' ' ) ); |
674 | | - return $skin->makeKnownLinkObj( $list, wfMsgHtml( 'ipb-unblock-addr', $addr ), |
675 | | - 'action=unblock&ip=' . urlencode( $this->BlockAddress ) ); |
| 676 | + $message = wfMsgHtml( 'ipb-unblock-addr', $addr ); |
| 677 | + $query['ip'] = $this->BlockAddress; |
676 | 678 | } else { |
677 | | - return $skin->makeKnownLinkObj( $list, wfMsgHtml( 'ipb-unblock' ), 'action=unblock' ); |
| 679 | + $message = wfMsgHtml( 'ipb-unblock' ); |
678 | 680 | } |
| 681 | + return $skin->linkKnown( |
| 682 | + $list, |
| 683 | + $message, |
| 684 | + array(), |
| 685 | + $query |
| 686 | + ); |
679 | 687 | } |
680 | 688 | |
681 | 689 | /** |
— | — | @@ -685,13 +693,22 @@ |
686 | 694 | */ |
687 | 695 | private function getBlockListLink( $skin ) { |
688 | 696 | $list = SpecialPage::getTitleFor( 'Ipblocklist' ); |
| 697 | + $query = array(); |
| 698 | + |
689 | 699 | if( $this->BlockAddress ) { |
690 | 700 | $addr = htmlspecialchars( strtr( $this->BlockAddress, '_', ' ' ) ); |
691 | | - return $skin->makeKnownLinkObj( $list, wfMsgHtml( 'ipb-blocklist-addr', $addr ), |
692 | | - 'ip=' . urlencode( $this->BlockAddress ) ); |
| 701 | + $message = wfMsgHtml( 'ipb-blocklist-addr', $addr ); |
| 702 | + $query['ip'] = $this->BlockAddress; |
693 | 703 | } else { |
694 | | - return $skin->makeKnownLinkObj( $list, wfMsgHtml( 'ipb-blocklist' ) ); |
| 704 | + $message = wfMsgHtml( 'ipb-blocklist' ); |
695 | 705 | } |
| 706 | + |
| 707 | + return $skin->linkKnown( |
| 708 | + $list, |
| 709 | + $message, |
| 710 | + array(), |
| 711 | + $query |
| 712 | + ); |
696 | 713 | } |
697 | 714 | |
698 | 715 | /** |
Index: trunk/phase3/includes/specials/SpecialMostrevisions.php |
— | — | @@ -42,11 +42,16 @@ |
43 | 43 | $nt = Title::makeTitle( $result->namespace, $result->title ); |
44 | 44 | $text = $wgContLang->convert( $nt->getPrefixedText() ); |
45 | 45 | |
46 | | - $plink = $skin->makeKnownLinkObj( $nt, $text ); |
| 46 | + $plink = $skin->linkKnown( $nt, $text ); |
47 | 47 | |
48 | 48 | $nl = wfMsgExt( 'nrevisions', array( 'parsemag', 'escape'), |
49 | 49 | $wgLang->formatNum( $result->value ) ); |
50 | | - $nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' ); |
| 50 | + $nlink = $skin->linkKnown( |
| 51 | + $nt, |
| 52 | + $nl, |
| 53 | + array(), |
| 54 | + array( 'action' => 'history' ) |
| 55 | + ); |
51 | 56 | |
52 | 57 | return wfSpecialList($plink, $nlink); |
53 | 58 | } |
Index: trunk/phase3/includes/specials/SpecialAllpages.php |
— | — | @@ -70,45 +70,45 @@ |
71 | 71 | * @param string $to dbKey we are ending listing at. |
72 | 72 | */ |
73 | 73 | function namespaceForm( $namespace = NS_MAIN, $from = '', $to = '' ) { |
74 | | - global $wgScript; |
75 | | - $t = $this->getTitle(); |
76 | | - |
77 | | - $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) ); |
78 | | - $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); |
79 | | - $out .= Xml::hidden( 'title', $t->getPrefixedText() ); |
80 | | - $out .= Xml::openElement( 'fieldset' ); |
81 | | - $out .= Xml::element( 'legend', null, wfMsg( 'allpages' ) ); |
82 | | - $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) ); |
83 | | - $out .= "<tr> |
84 | | - <td class='mw-label'>" . |
85 | | - Xml::label( wfMsg( 'allpagesfrom' ), 'nsfrom' ) . |
86 | | - "</td> |
87 | | - <td class='mw-input'>" . |
88 | | - Xml::input( 'from', 30, str_replace('_',' ',$from), array( 'id' => 'nsfrom' ) ) . |
89 | | - "</td> |
90 | | - </tr> |
91 | | - <tr> |
92 | | - <td class='mw-label'>" . |
93 | | - Xml::label( wfMsg( 'allpagesto' ), 'nsto' ) . |
94 | | - "</td> |
95 | | - <td class='mw-input'>" . |
96 | | - Xml::input( 'to', 30, str_replace('_',' ',$to), array( 'id' => 'nsto' ) ) . |
97 | | - "</td> |
98 | | - </tr> |
99 | | - <tr> |
100 | | - <td class='mw-label'>" . |
101 | | - Xml::label( wfMsg( 'namespace' ), 'namespace' ) . |
102 | | - "</td> |
103 | | - <td class='mw-input'>" . |
104 | | - Xml::namespaceSelector( $namespace, null ) . ' ' . |
105 | | - Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . |
106 | | - "</td> |
107 | | - </tr>"; |
108 | | - $out .= Xml::closeElement( 'table' ); |
109 | | - $out .= Xml::closeElement( 'fieldset' ); |
110 | | - $out .= Xml::closeElement( 'form' ); |
111 | | - $out .= Xml::closeElement( 'div' ); |
112 | | - return $out; |
| 74 | + global $wgScript; |
| 75 | + $t = $this->getTitle(); |
| 76 | + |
| 77 | + $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) ); |
| 78 | + $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); |
| 79 | + $out .= Xml::hidden( 'title', $t->getPrefixedText() ); |
| 80 | + $out .= Xml::openElement( 'fieldset' ); |
| 81 | + $out .= Xml::element( 'legend', null, wfMsg( 'allpages' ) ); |
| 82 | + $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) ); |
| 83 | + $out .= "<tr> |
| 84 | + <td class='mw-label'>" . |
| 85 | + Xml::label( wfMsg( 'allpagesfrom' ), 'nsfrom' ) . |
| 86 | + " </td> |
| 87 | + <td class='mw-input'>" . |
| 88 | + Xml::input( 'from', 30, str_replace('_',' ',$from), array( 'id' => 'nsfrom' ) ) . |
| 89 | + " </td> |
| 90 | +</tr> |
| 91 | +<tr> |
| 92 | + <td class='mw-label'>" . |
| 93 | + Xml::label( wfMsg( 'allpagesto' ), 'nsto' ) . |
| 94 | + " </td> |
| 95 | + <td class='mw-input'>" . |
| 96 | + Xml::input( 'to', 30, str_replace('_',' ',$to), array( 'id' => 'nsto' ) ) . |
| 97 | + " </td> |
| 98 | +</tr> |
| 99 | +<tr> |
| 100 | + <td class='mw-label'>" . |
| 101 | + Xml::label( wfMsg( 'namespace' ), 'namespace' ) . |
| 102 | + " </td> |
| 103 | + <td class='mw-input'>" . |
| 104 | + Xml::namespaceSelector( $namespace, null ) . ' ' . |
| 105 | + Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . |
| 106 | + " </td> |
| 107 | +</tr>"; |
| 108 | + $out .= Xml::closeElement( 'table' ); |
| 109 | + $out .= Xml::closeElement( 'fieldset' ); |
| 110 | + $out .= Xml::closeElement( 'form' ); |
| 111 | + $out .= Xml::closeElement( 'div' ); |
| 112 | + return $out; |
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
— | — | @@ -307,7 +307,7 @@ |
308 | 308 | $t = Title::makeTitle( $s->page_namespace, $s->page_title ); |
309 | 309 | if( $t ) { |
310 | 310 | $link = ( $s->page_is_redirect ? '<div class="allpagesredirect">' : '' ) . |
311 | | - $sk->makeKnownLinkObj( $t, htmlspecialchars( $t->getText() ), false, false ) . |
| 311 | + $sk->linkKnown( $t, htmlspecialchars( $t->getText() ) ) . |
312 | 312 | ($s->page_is_redirect ? '</div>' : '' ); |
313 | 313 | } else { |
314 | 314 | $link = '[[' . htmlspecialchars( $s->page_title ) . ']]'; |
— | — | @@ -384,20 +384,34 @@ |
385 | 385 | |
386 | 386 | # Do we put a previous link ? |
387 | 387 | if( isset( $prevTitle ) && $pt = $prevTitle->getText() ) { |
388 | | - $q = 'from=' . $prevTitle->getPartialUrl() |
389 | | - . ( $namespace ? '&namespace=' . $namespace : '' ); |
390 | | - $prevLink = $sk->makeKnownLinkObj( $self, |
391 | | - wfMsgHTML( 'prevpage', htmlspecialchars( $pt ) ), $q ); |
| 388 | + $query = array( 'from' => $prevTitle->getPartialUrl() ); |
| 389 | + |
| 390 | + if( $namespace ) |
| 391 | + $query['namespace'] = $namespace; |
| 392 | + |
| 393 | + $prevLink = $sk->linkKnown( |
| 394 | + $self, |
| 395 | + wfMsgHTML( 'prevpage', htmlspecialchars( $pt ) ), |
| 396 | + array(), |
| 397 | + $query |
| 398 | + ); |
392 | 399 | $out2 = $wgLang->pipeList( array( $out2, $prevLink ) ); |
393 | 400 | } |
394 | 401 | |
395 | 402 | if( $n == $this->maxPerPage && $s = $res->fetchObject() ) { |
396 | 403 | # $s is the first link of the next chunk |
397 | 404 | $t = Title::MakeTitle($namespace, $s->page_title); |
398 | | - $q = 'from=' . $t->getPartialUrl() |
399 | | - . ( $namespace ? '&namespace=' . $namespace : '' ); |
400 | | - $nextLink = $sk->makeKnownLinkObj( $self, |
401 | | - wfMsgHtml( 'nextpage', htmlspecialchars( $t->getText() ) ), $q ); |
| 405 | + $query = array( 'from' => $t->getPartialUrl() ); |
| 406 | + |
| 407 | + if( $namespace ) |
| 408 | + $query['namespace'] = $namespace; |
| 409 | + |
| 410 | + $nextLink = $sk->linkKnown( |
| 411 | + $self, |
| 412 | + wfMsgHtml( 'nextpage', htmlspecialchars( $t->getText() ) ), |
| 413 | + array(), |
| 414 | + $query |
| 415 | + ); |
402 | 416 | $out2 = $wgLang->pipeList( array( $out2, $nextLink ) ); |
403 | 417 | } |
404 | 418 | $out2 .= "</td></tr></table>"; |
Index: trunk/phase3/includes/specials/SpecialListfiles.php |
— | — | @@ -133,7 +133,7 @@ |
134 | 134 | if ( $imgfile === null ) $imgfile = wfMsg( 'imgfile' ); |
135 | 135 | |
136 | 136 | $name = $this->mCurrentRow->img_name; |
137 | | - $link = $this->getSkin()->makeKnownLinkObj( Title::makeTitle( NS_FILE, $name ), $value ); |
| 137 | + $link = $this->getSkin()->linkKnown( Title::makeTitle( NS_FILE, $name ), $value ); |
138 | 138 | $image = wfLocalFile( $value ); |
139 | 139 | $url = $image->getURL(); |
140 | 140 | $download = Xml::element('a', array( 'href' => $url ), $imgfile ); |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -677,8 +677,12 @@ |
678 | 678 | $wgOut->addHTML( "<ul>\n" ); |
679 | 679 | while( $row = $result->fetchObject() ) { |
680 | 680 | $title = Title::makeTitleSafe( $row->ar_namespace, $row->ar_title ); |
681 | | - $link = $sk->makeKnownLinkObj( $undelete, htmlspecialchars( $title->getPrefixedText() ), |
682 | | - 'target=' . $title->getPrefixedUrl() ); |
| 681 | + $link = $sk->linkKnown( |
| 682 | + $undelete, |
| 683 | + htmlspecialchars( $title->getPrefixedText() ), |
| 684 | + array(), |
| 685 | + array( 'target' => $title->getPrefixedUrl() ) |
| 686 | + ); |
683 | 687 | $revs = wfMsgExt( 'undeleterevisions', |
684 | 688 | array( 'parseinline' ), |
685 | 689 | $wgLang->formatNum( $row->count ) ); |
— | — | @@ -718,7 +722,7 @@ |
719 | 723 | |
720 | 724 | $wgOut->setPageTitle( wfMsg( 'undeletepage' ) ); |
721 | 725 | |
722 | | - $link = $skin->makeKnownLinkObj( |
| 726 | + $link = $skin->linkKnown( |
723 | 727 | SpecialPage::getTitleFor( 'Undelete', $this->mTargetObj->getPrefixedDBkey() ), |
724 | 728 | htmlspecialchars( $this->mTargetObj->getPrefixedText() ) |
725 | 729 | ); |
— | — | @@ -770,7 +774,7 @@ |
771 | 775 | Xml::openElement( 'div' ) . |
772 | 776 | Xml::openElement( 'form', array( |
773 | 777 | 'method' => 'post', |
774 | | - 'action' => $self->getLocalURL( "action=submit" ) ) ) . |
| 778 | + 'action' => $self->getLocalURL( array( 'action' => 'submit' ) ) ) ) . |
775 | 779 | Xml::element( 'input', array( |
776 | 780 | 'type' => 'hidden', |
777 | 781 | 'name' => 'target', |
— | — | @@ -987,7 +991,7 @@ |
988 | 992 | |
989 | 993 | if ( $this->mAllowed ) { |
990 | 994 | $titleObj = SpecialPage::getTitleFor( "Undelete" ); |
991 | | - $action = $titleObj->getLocalURL( "action=submit" ); |
| 995 | + $action = $titleObj->getLocalURL( array( 'action' => 'submit' ) ); |
992 | 996 | # Start the form here |
993 | 997 | $top = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action, 'id' => 'undelete' ) ); |
994 | 998 | $wgOut->addHTML( $top ); |
— | — | @@ -1111,8 +1115,16 @@ |
1112 | 1116 | if( !$rev->userCan( Revision::DELETED_TEXT ) ) { |
1113 | 1117 | $last = wfMsgHtml('diff'); |
1114 | 1118 | } else if( $remaining > 0 || ($earliestLiveTime && $ts > $earliestLiveTime) ) { |
1115 | | - $last = $sk->makeKnownLinkObj( $titleObj, wfMsgHtml('diff'), |
1116 | | - "target=" . $this->mTargetObj->getPrefixedUrl() . "×tamp=$ts&diff=prev" ); |
| 1119 | + $last = $sk->linkKnown( |
| 1120 | + $titleObj, |
| 1121 | + wfMsgHtml('diff'), |
| 1122 | + array(), |
| 1123 | + array( |
| 1124 | + 'target' => $this->mTargetObj->getPrefixedUrl(), |
| 1125 | + 'timestamp' => $ts, |
| 1126 | + 'diff' => 'prev' |
| 1127 | + ) |
| 1128 | + ); |
1117 | 1129 | } else { |
1118 | 1130 | $last = wfMsgHtml('diff'); |
1119 | 1131 | } |
— | — | @@ -1201,8 +1213,15 @@ |
1202 | 1214 | if( !$rev->userCan(Revision::DELETED_TEXT) ) { |
1203 | 1215 | return '<span class="history-deleted">' . $time . '</span>'; |
1204 | 1216 | } else { |
1205 | | - $link = $sk->makeKnownLinkObj( $titleObj, $time, |
1206 | | - "target=".$this->mTargetObj->getPrefixedUrl()."×tamp=$ts" ); |
| 1217 | + $link = $sk->linkKnown( |
| 1218 | + $titleObj, |
| 1219 | + $time, |
| 1220 | + array(), |
| 1221 | + array( |
| 1222 | + 'target' => $this->mTargetObj->getPrefixedUrl(), |
| 1223 | + 'timestamp' => $ts |
| 1224 | + ) |
| 1225 | + ); |
1207 | 1226 | if( $rev->isDeleted(Revision::DELETED_TEXT) ) |
1208 | 1227 | $link = '<span class="history-deleted">' . $link . '</span>'; |
1209 | 1228 | return $link; |
— | — | @@ -1219,10 +1238,16 @@ |
1220 | 1239 | if( !$file->userCan(File::DELETED_FILE) ) { |
1221 | 1240 | return '<span class="history-deleted">' . $wgLang->timeanddate( $ts, true ) . '</span>'; |
1222 | 1241 | } else { |
1223 | | - $link = $sk->makeKnownLinkObj( $titleObj, $wgLang->timeanddate( $ts, true ), |
1224 | | - "target=".$this->mTargetObj->getPrefixedUrl(). |
1225 | | - "&file=$key" . |
1226 | | - "&token=" . urlencode( $wgUser->editToken( $key ) ) ); |
| 1242 | + $link = $sk->linkKnown( |
| 1243 | + $titleObj, |
| 1244 | + $wgLang->timeanddate( $ts, true ), |
| 1245 | + array(), |
| 1246 | + array( |
| 1247 | + 'target' => $this->mTargetObj->getPrefixedUrl(), |
| 1248 | + 'file' => $key, |
| 1249 | + 'token' => $wgUser->editToken( $key ) |
| 1250 | + ) |
| 1251 | + ); |
1227 | 1252 | if( $file->isDeleted(File::DELETED_FILE) ) |
1228 | 1253 | $link = '<span class="history-deleted">' . $link . '</span>'; |
1229 | 1254 | return $link; |
— | — | @@ -1281,7 +1306,7 @@ |
1282 | 1307 | $wgUser, $this->mComment) ); |
1283 | 1308 | |
1284 | 1309 | $skin = $wgUser->getSkin(); |
1285 | | - $link = $skin->makeKnownLinkObj( $this->mTargetObj ); |
| 1310 | + $link = $skin->linkKnown( $this->mTargetObj ); |
1286 | 1311 | $wgOut->addHTML( wfMsgWikiHtml( 'undeletedpage', $link ) ); |
1287 | 1312 | } else { |
1288 | 1313 | $wgOut->showFatalError( wfMsg( "cannotundelete" ) ); |
Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -1005,12 +1005,17 @@ |
1006 | 1006 | function makeLanguageSelectorLink( $text, $lang ) { |
1007 | 1007 | global $wgUser; |
1008 | 1008 | $self = SpecialPage::getTitleFor( 'Userlogin' ); |
1009 | | - $attr[] = 'uselang=' . $lang; |
| 1009 | + $attr = array( 'uselang' => $lang ); |
1010 | 1010 | if( $this->mType == 'signup' ) |
1011 | | - $attr[] = 'type=signup'; |
| 1011 | + $attr['type'] = 'signup'; |
1012 | 1012 | if( $this->mReturnTo ) |
1013 | | - $attr[] = 'returnto=' . $this->mReturnTo; |
| 1013 | + $attr['returnto'] = $this->mReturnTo; |
1014 | 1014 | $skin = $wgUser->getSkin(); |
1015 | | - return $skin->makeKnownLinkObj( $self, htmlspecialchars( $text ), implode( '&', $attr ) ); |
| 1015 | + return $skin->linkKnown( |
| 1016 | + $self, |
| 1017 | + htmlspecialchars( $text ), |
| 1018 | + array(), |
| 1019 | + $attr |
| 1020 | + ); |
1016 | 1021 | } |
1017 | 1022 | } |
Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php |
— | — | @@ -258,9 +258,19 @@ |
259 | 259 | } |
260 | 260 | } |
261 | 261 | |
262 | | - $suppressRedirect = $row->page_is_redirect ? 'redirect=no' : ''; |
263 | | - $link = $this->skin->makeKnownLinkObj( $nt, '', $suppressRedirect ); |
| 262 | + if( $row->page_is_redirect ) { |
| 263 | + $query = array( 'redirect' => 'no' ); |
| 264 | + } else { |
| 265 | + $query = array(); |
| 266 | + } |
264 | 267 | |
| 268 | + $link = $this->skin->linkKnown( |
| 269 | + $nt, |
| 270 | + null, |
| 271 | + array(), |
| 272 | + $query |
| 273 | + ); |
| 274 | + |
265 | 275 | // Display properties (redirect or template) |
266 | 276 | $propsText = ''; |
267 | 277 | $props = array(); |
— | — | @@ -294,11 +304,21 @@ |
295 | 305 | $title = SpecialPage::getTitleFor( 'Whatlinkshere' ); |
296 | 306 | |
297 | 307 | $targetText = $target->getPrefixedUrl(); |
298 | | - return $this->skin->makeKnownLinkObj( $title, $text, 'target=' . $targetText ); |
| 308 | + return $this->skin->linkKnown( |
| 309 | + $title, |
| 310 | + $text, |
| 311 | + array(), |
| 312 | + array( 'target' => $targetText ) |
| 313 | + ); |
299 | 314 | } |
300 | 315 | |
301 | 316 | function makeSelfLink( $text, $query ) { |
302 | | - return $this->skin->makeKnownLinkObj( $this->selfTitle, $text, $query ); |
| 317 | + return $this->skin->linkKnown( |
| 318 | + $this->selfTitle, |
| 319 | + $text, |
| 320 | + array(), |
| 321 | + $query |
| 322 | + ); |
303 | 323 | } |
304 | 324 | |
305 | 325 | function getPrevNext( $prevId, $nextId ) { |
— | — | @@ -313,18 +333,18 @@ |
314 | 334 | |
315 | 335 | if ( 0 != $prevId ) { |
316 | 336 | $overrides = array( 'from' => $this->opts->getValue( 'back' ) ); |
317 | | - $prev = $this->makeSelfLink( $prev, wfArrayToCGI( $overrides, $changed ) ); |
| 337 | + $prev = $this->makeSelfLink( $prev, array_merge( $overrides, $changed ) ); |
318 | 338 | } |
319 | 339 | if ( 0 != $nextId ) { |
320 | 340 | $overrides = array( 'from' => $nextId, 'back' => $prevId ); |
321 | | - $next = $this->makeSelfLink( $next, wfArrayToCGI( $overrides, $changed ) ); |
| 341 | + $next = $this->makeSelfLink( $next, array_merge( $overrides, $changed ) ); |
322 | 342 | } |
323 | 343 | |
324 | 344 | $limitLinks = array(); |
325 | 345 | foreach ( $this->limits as $limit ) { |
326 | 346 | $prettyLimit = $wgLang->formatNum( $limit ); |
327 | 347 | $overrides = array( 'limit' => $limit ); |
328 | | - $limitLinks[] = $this->makeSelfLink( $prettyLimit, wfArrayToCGI( $overrides, $changed ) ); |
| 348 | + $limitLinks[] = $this->makeSelfLink( $prettyLimit, array_merge( $overrides, $changed ) ); |
329 | 349 | } |
330 | 350 | |
331 | 351 | $nums = $wgLang->pipeList( $limitLinks ); |
— | — | @@ -391,7 +411,7 @@ |
392 | 412 | $chosen = $this->opts->getValue( $type ); |
393 | 413 | $msg = wfMsgHtml( "whatlinkshere-{$type}", $chosen ? $show : $hide ); |
394 | 414 | $overrides = array( $type => !$chosen ); |
395 | | - $links[] = $this->makeSelfLink( $msg, wfArrayToCGI( $overrides, $changed ) ); |
| 415 | + $links[] = $this->makeSelfLink( $msg, array_merge( $overrides, $changed ) ); |
396 | 416 | } |
397 | 417 | return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), $wgLang->pipeList( $links ) ); |
398 | 418 | } |