Index: trunk/phase3/includes/api/ApiOpenSearch.php |
— | — | @@ -51,20 +51,6 @@ |
52 | 52 | $this->getMain()->setCacheMaxAge(1200); |
53 | 53 | |
54 | 54 | $srchres = PrefixSearch::titleSearch( $search, $limit, $namespaces ); |
55 | | - |
56 | | - if( $params['redirects'] ) { |
57 | | - foreach( $srchres as &$t ) { |
58 | | - $title = Title::newFromText( $t ); |
59 | | - if( is_null( $title ) ) { |
60 | | - continue; |
61 | | - } |
62 | | - $article = new Article( $title ); |
63 | | - $redirTitle = $article->getRedirectTarget(); |
64 | | - if( !is_null( $redirTitle ) ) { |
65 | | - $t = $redirTitle->getPrefixedText(); |
66 | | - } |
67 | | - } |
68 | | - } |
69 | 55 | |
70 | 56 | // Set top level elements |
71 | 57 | $result = $this->getResult(); |
— | — | @@ -87,7 +73,6 @@ |
88 | 74 | ApiBase :: PARAM_TYPE => 'namespace', |
89 | 75 | ApiBase :: PARAM_ISMULTI => true |
90 | 76 | ), |
91 | | - 'redirects' => false, |
92 | 77 | ); |
93 | 78 | } |
94 | 79 | |
— | — | @@ -96,7 +81,6 @@ |
97 | 82 | 'search' => 'Search string', |
98 | 83 | 'limit' => 'Maximum amount of results to return', |
99 | 84 | 'namespace' => 'Namespaces to search', |
100 | | - 'redirects' => 'Resolve redirects', |
101 | 85 | ); |
102 | 86 | } |
103 | 87 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -114,8 +114,6 @@ |
115 | 115 | * (bug 17069) Added ucshow=patrolled|!patrolled to list=usercontribs |
116 | 116 | * action=delete respects $wgDeleteRevisionsLimit and the bigdelete user right |
117 | 117 | * (bug 15949) Add undo functionality to action=edit |
118 | | -* (bug 17142) Added redirects parameter to action=opensearch to control redirect |
119 | | - resolution |
120 | 118 | |
121 | 119 | === Languages updated in 1.15 === |
122 | 120 | |
Index: trunk/extensions/OpenSearchXml/ApiOpenSearchXml.php |
— | — | @@ -66,7 +66,6 @@ |
67 | 67 | $search = $params['search']; |
68 | 68 | $limit = $params['limit']; |
69 | 69 | $namespaces = $params['namespace']; |
70 | | - $this->redirects = $params['redirects']; |
71 | 70 | |
72 | 71 | // Open search results may be stored for a very long time |
73 | 72 | $this->getMain()->setCacheMaxAge(1200); |
— | — | @@ -90,11 +89,9 @@ |
91 | 90 | } |
92 | 91 | |
93 | 92 | protected function formatItem( $name ) { |
94 | | - $title = Title::newFromText( $name ); |
| 93 | + $title = TItle::newFromText( $name ); |
95 | 94 | if( $title ) { |
96 | | - if( $this->redirects ) { |
97 | | - $title = $this->_checkRedirect( $title ); |
98 | | - } |
| 95 | + $title = $this->_checkRedirect( $title ); |
99 | 96 | if( $this->_seen( $title ) ) { |
100 | 97 | return false; |
101 | 98 | } |