Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php |
— | — | @@ -40,23 +40,23 @@ |
41 | 41 | public function doMainQuery( $conds, $opts ) { |
42 | 42 | global $wgUser, $wgOut; |
43 | 43 | |
44 | | - $title = Title::newFromURL( $opts['target'] ); |
| 44 | + $target = $opts['target']; |
45 | 45 | $showlinkedto = $opts['showlinkedto']; |
46 | 46 | $limit = $opts['limit']; |
47 | 47 | |
48 | | - $target = $title ? $title->getPrefixedText() : ''; |
49 | 48 | if ( $target === '' ) { |
50 | 49 | return false; |
51 | 50 | } |
52 | | - if( !$title ){ |
| 51 | + $title = Title::newFromURL( $target ); |
| 52 | + if( !$title || $title->getInterwiki() != '' ){ |
53 | 53 | global $wgOut; |
54 | | - $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); |
| 54 | + $wgOut->wrapWikiMsg( '<div class="errorbox">$1</div><br clear="both" />', 'allpagesbadtitle' ); |
55 | 55 | return false; |
56 | 56 | } |
57 | | - |
58 | | - $wgOut->setPageTitle( wfMsg( 'recentchangeslinked-title', $target ) ); |
59 | 57 | $this->mTargetTitle = $title; |
60 | 58 | |
| 59 | + $wgOut->setPageTitle( wfMsg( 'recentchangeslinked-title', $title->getPrefixedText() ) ); |
| 60 | + |
61 | 61 | $dbr = wfGetDB( DB_SLAVE, 'recentchangeslinked' ); |
62 | 62 | $id = $title->getArticleId(); |
63 | 63 | |
— | — | @@ -118,10 +118,10 @@ |
119 | 119 | function setTopText( &$out, $opts ){} |
120 | 120 | |
121 | 121 | function setBottomText( &$out, $opts ){ |
122 | | - if( $target = $opts['target'] ){ |
| 122 | + if( isset( $this->mTargetTitle ) && is_object( $this->mTargetTitle ) ){ |
123 | 123 | global $wgUser; |
124 | | - $out->setFeedAppendQuery( "target=" . urlencode( $target ) ); |
125 | | - $out->addHTML("< ".$wgUser->getSkin()->makeLinkObj( Title::newFromUrl( $target ), "", "redirect=no" )."<hr />\n"); |
| 124 | + $out->setFeedAppendQuery( "target=" . urlencode( $this->mTargetTitle->getPrefixedDBkey() ) ); |
| 125 | + $out->addHTML("< ".$wgUser->getSkin()->makeLinkObj( $this->mTargetTitle, "", "redirect=no" )."<hr />\n"); |
126 | 126 | } |
127 | 127 | if( isset( $this->mResultEmpty ) && $this->mResultEmpty ){ |
128 | 128 | $out->addWikiMsg( 'recentchangeslinked-noresult' ); |
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php |
— | — | @@ -571,11 +571,10 @@ |
572 | 572 | * @param $options |
573 | 573 | */ |
574 | 574 | function makeOptionsLink( $title, $override, $options, $active = false ) { |
575 | | - global $wgUser, $wgContLang; |
| 575 | + global $wgUser; |
576 | 576 | $sk = $wgUser->getSkin(); |
577 | | - return $sk->makeKnownLinkObj( $this->getTitle(), |
578 | | - htmlspecialchars( $title ), wfArrayToCGI( $override, $options ), '', '', |
579 | | - $active ? 'style="font-weight: bold;"' : '' ); |
| 577 | + return $sk->makeKnownLinkObj( $this->getTitle(), htmlspecialchars( $title ), |
| 578 | + wfArrayToCGI( $override, $options ), '', '', $active ? 'style="font-weight: bold;"' : '' ); |
580 | 579 | } |
581 | 580 | |
582 | 581 | /** |