r71436 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71435‎ | r71436 | r71437 >
Date:16:10, 22 August 2010
Author:demon
Status:ok
Tags:
Comment:
(bug 23703) ForeignAPIRepo fails on findBySha1() when using a 1.14 install as a repository due to missing 'name' attribute from the API list=allimages
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/filerepo/ForeignAPIRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php
@@ -160,6 +160,10 @@
161161 $ret = array();
162162 if ( isset( $results['query']['allimages'] ) ) {
163163 foreach ( $results['query']['allimages'] as $img ) {
 164+ // 1.14 was broken, doesn't return name attribute
 165+ if( !isset( $img['name'] ) ) {
 166+ continue;
 167+ }
164168 $ret[] = new ForeignAPIFile( Title::makeTitle( NS_FILE, $img['name'] ), $this, $img );
165169 }
166170 }
Index: trunk/phase3/RELEASE-NOTES
@@ -299,6 +299,8 @@
300300 * (bug 24804) Corrected commafying in Polish and Ukrainian
301301 * "Difference between pages" is now displayed instead of "Difference between
302302 revisions" on diffs when appropriate.
 303+* (bug 23703) ForeignAPIRepo fails on findBySha1() when using a 1.14 install as
 304+ a repository due to missing 'name' attribute from the API list=allimages
303305
304306 === API changes in 1.17 ===
305307 * (bug 22738) Allow filtering by action type on query=logevent.

Status & tagging log