API: Add the name attribute back to list=allimages; it disappeared in r35085
authorRoan Kattouw <catrope@users.mediawiki.org>
Sat, 27 Sep 2008 11:04:23 +0000 (11:04 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sat, 27 Sep 2008 11:04:23 +0000 (11:04 +0000)
includes/api/ApiQueryAllimages.php

index 2754c25..8b513f3 100644 (file)
@@ -109,10 +109,10 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase {
 
                        if (is_null($resultPageSet)) {
                                $file = $repo->newFileFromRow( $row );
-
-                               $data[] = ApiQueryImageInfo::getInfo( $file, $prop, $result );
+                               $data[] = array_merge(array('name' => $row->img_name),
+                                       ApiQueryImageInfo::getInfo($file, $prop, $result));
                        } else {
-                               $data[] = Title::makeTitle( NS_IMAGE, $row->img_name );
+                               $data[] = Title::makeTitle(NS_IMAGE, $row->img_name);
                        }
                }
                $db->freeResult($res);