r46131 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46130‎ | r46131 | r46132 >
Date:12:04, 24 January 2009
Author:catrope
Status:reverted (Comments)
Tags:
Comment:
OpenSearchXml extension: (bug 17142) action=opensearch shouldn't resolve redirects in XML mode
Modified paths:
  • /trunk/extensions/OpenSearchXml/ApiOpenSearchXml.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenSearchXml/ApiOpenSearchXml.php
@@ -89,9 +89,8 @@
9090 }
9191
9292 protected function formatItem( $name ) {
93 - $title = TItle::newFromText( $name );
 93+ $title = Title::newFromText( $name );
9494 if( $title ) {
95 - $title = $this->_checkRedirect( $title );
9695 if( $this->_seen( $title ) ) {
9796 return false;
9897 }
@@ -116,16 +115,6 @@
117116 return $item;
118117 }
119118
120 - protected function _checkRedirect( $title ) {
121 - $art = new Article( $title );
122 - $target = $art->getRedirectTarget();
123 - if( $target ) {
124 - return $target;
125 - } else {
126 - return $title;
127 - }
128 - }
129 -
130119 protected function _seen( $title ) {
131120 $name = $title->getPrefixedText();
132121 if( isset( $this->mSeen[$name] ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r46295Reverting r46131 "OpenSearchXml extension: (bug 17142) action=opensearch shou...brion22:57, 26 January 2009
r46341API: (bug 17142) Add redirects parameter to action=opensearch to control redi...catrope14:43, 27 January 2009
r46379Pulling back r46341 and r46342 for now "API: (bug 17142) Add redirects parame...brion20:39, 27 January 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   22:58, 26 January 2009

Reverted in r46295 -- non-bug.

Status & tagging log