Index: branches/REL1_18/phase3/includes/specials/SpecialLinkSearch.php |
— | — | @@ -43,14 +43,20 @@ |
44 | 44 | } |
45 | 45 | |
46 | 46 | function execute( $par ) { |
47 | | - global $wgOut, $wgRequest, $wgUrlProtocols, $wgMiserMode, $wgLang; |
| 47 | + global $wgUrlProtocols, $wgMiserMode; |
| 48 | + |
48 | 49 | $this->setHeaders(); |
49 | | - $wgOut->allowClickjacking(); |
| 50 | + $this->outputHeader(); |
50 | 51 | |
51 | | - $target = $wgRequest->getVal( 'target', $par ); |
52 | | - $namespace = $wgRequest->getIntorNull( 'namespace', null ); |
| 52 | + $out = $this->getOutput(); |
| 53 | + $out->allowClickjacking(); |
53 | 54 | |
| 55 | + $request = $this->getRequest(); |
| 56 | + $target = $request->getVal( 'target', $par ); |
| 57 | + $namespace = $request->getIntorNull( 'namespace', null ); |
| 58 | + |
54 | 59 | $protocols_list = array(); |
| 60 | + |
55 | 61 | foreach( $wgUrlProtocols as $prot ) { |
56 | 62 | if ( $prot !== '//' ) { |
57 | 63 | $protocols_list[] = $prot; |
— | — | @@ -79,9 +85,10 @@ |
80 | 86 | $protocol = ''; |
81 | 87 | } |
82 | 88 | |
83 | | - $out->addWikiMsg( 'linksearch-text', '<nowiki>' . $this->getLanguage()->commaList( $protocols_list ) . '</nowiki>' ); |
| 89 | + $out->addWikiMsg( 'linksearch-text', '<nowiki>' . $this->getLang()->commaList( $wgUrlProtocols ) . '</nowiki>' ); |
| 90 | + |
84 | 91 | $s = Xml::openElement( 'form', array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'] ) ) . |
85 | | - Html::hidden( 'title', $self->getPrefixedDbKey() ) . |
| 92 | + Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) . |
86 | 93 | '<fieldset>' . |
87 | 94 | Xml::element( 'legend', array(), wfMsg( 'linksearch' ) ) . |
88 | 95 | Xml::inputLabel( wfMsg( 'linksearch-pat' ), 'target', 'target', 50, $target ) . ' '; |
— | — | @@ -92,7 +99,7 @@ |
93 | 100 | $s .= Xml::submitButton( wfMsg( 'linksearch-ok' ) ) . |
94 | 101 | '</fieldset>' . |
95 | 102 | Xml::closeElement( 'form' ); |
96 | | - $wgOut->addHTML( $s ); |
| 103 | + $out->addHTML( $s ); |
97 | 104 | |
98 | 105 | if( $target != '' ) { |
99 | 106 | $this->setParams( array( |
— | — | @@ -101,7 +108,7 @@ |
102 | 109 | 'protocol' => $protocol ) ); |
103 | 110 | parent::execute( $par ); |
104 | 111 | if( $this->mMungedQuery === false ) |
105 | | - $wgOut->addWikiMsg( 'linksearch-error' ); |
| 112 | + $out->addWikiMsg( 'linksearch-error' ); |
106 | 113 | } |
107 | 114 | } |
108 | 115 | |
— | — | @@ -172,8 +179,8 @@ |
173 | 180 | function formatResult( $skin, $result ) { |
174 | 181 | $title = Title::makeTitle( $result->namespace, $result->title ); |
175 | 182 | $url = $result->url; |
176 | | - $pageLink = $skin->linkKnown( $title ); |
177 | | - $urlLink = $skin->makeExternalLink( $url, $url ); |
| 183 | + $pageLink = Linker::linkKnown( $title ); |
| 184 | + $urlLink = Linker::makeExternalLink( $url, $url ); |
178 | 185 | |
179 | 186 | return wfMsgHtml( 'linksearch-line', $urlLink, $pageLink ); |
180 | 187 | } |
— | — | @@ -182,14 +189,13 @@ |
183 | 190 | * Override to check query validity. |
184 | 191 | */ |
185 | 192 | function doQuery( $offset = false, $limit = false ) { |
186 | | - global $wgOut; |
187 | 193 | list( $this->mMungedQuery, ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt ); |
188 | 194 | if( $this->mMungedQuery === false ) { |
189 | | - $wgOut->addWikiMsg( 'linksearch-error' ); |
| 195 | + $this->getOutput()->addWikiMsg( 'linksearch-error' ); |
190 | 196 | } else { |
191 | 197 | // For debugging |
192 | 198 | // Generates invalid xhtml with patterns that contain -- |
193 | | - //$wgOut->addHTML( "\n<!-- " . htmlspecialchars( $this->mMungedQuery ) . " -->\n" ); |
| 199 | + //$this->getOutput()->addHTML( "\n<!-- " . htmlspecialchars( $this->mMungedQuery ) . " -->\n" ); |
194 | 200 | parent::doQuery( $offset, $limit ); |
195 | 201 | } |
196 | 202 | } |
Property changes on: branches/REL1_18/phase3 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
197 | 203 | Merged /trunk/phase3:r96774 |