r46342 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46341‎ | r46342 | r46343 >
Date:14:44, 27 January 2009
Author:catrope
Status:reverted (Comments)
Tags:
Comment:
OpenSearchXML extension: Respect redirects parameter added in r46341 (previous commit)
Modified paths:
  • /trunk/extensions/OpenSearchXml/ApiOpenSearchXml.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenSearchXml/ApiOpenSearchXml.php
@@ -66,6 +66,7 @@
6767 $search = $params['search'];
6868 $limit = $params['limit'];
6969 $namespaces = $params['namespace'];
 70+ $this->redirects = $params['redirects'];
7071
7172 // Open search results may be stored for a very long time
7273 $this->getMain()->setCacheMaxAge(1200);
@@ -89,9 +90,11 @@
9091 }
9192
9293 protected function formatItem( $name ) {
93 - $title = TItle::newFromText( $name );
 94+ $title = Title::newFromText( $name );
9495 if( $title ) {
95 - $title = $this->_checkRedirect( $title );
 96+ if( $this->redirects ) {
 97+ $title = $this->_checkRedirect( $title );
 98+ }
9699 if( $this->_seen( $title ) ) {
97100 return false;
98101 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r46379Pulling back r46341 and r46342 for now "API: (bug 17142) Add redirects parame...brion20:39, 27 January 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r46341API: (bug 17142) Add redirects parameter to action=opensearch to control redi...catrope14:43, 27 January 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   18:10, 27 January 2009

Harms usability.

#Comment by Brion VIBBER (talk | contribs)   20:39, 27 January 2009

Reverted in r46379

Status & tagging log