Index: trunk/extensions/OpenSearchXml/ApiOpenSearchXml.php |
— | — | @@ -66,6 +66,7 @@ |
67 | 67 | $search = $params['search']; |
68 | 68 | $limit = $params['limit']; |
69 | 69 | $namespaces = $params['namespace']; |
| 70 | + $this->redirects = $params['redirects']; |
70 | 71 | |
71 | 72 | // Open search results may be stored for a very long time |
72 | 73 | $this->getMain()->setCacheMaxAge(1200); |
— | — | @@ -89,9 +90,11 @@ |
90 | 91 | } |
91 | 92 | |
92 | 93 | protected function formatItem( $name ) { |
93 | | - $title = TItle::newFromText( $name ); |
| 94 | + $title = Title::newFromText( $name ); |
94 | 95 | if( $title ) { |
95 | | - $title = $this->_checkRedirect( $title ); |
| 96 | + if( $this->redirects ) { |
| 97 | + $title = $this->_checkRedirect( $title ); |
| 98 | + } |
96 | 99 | if( $this->_seen( $title ) ) { |
97 | 100 | return false; |
98 | 101 | } |