r24661 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24660‎ | r24661 | r24662 >
Date:19:01, 7 August 2007
Author:yurik
Status:old
Tags:
Comment:
API: updated imageinfo output
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryImageInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryImageInfo.php
@@ -60,11 +60,11 @@
6161
6262 $data = array();
6363 if ( !$img ) {
64 - $data['missing'] = '';
 64+ $repository = '';
6565 } else {
66 -
67 - $data['repository'] = $img->getRepoName();
68 -
 66+
 67+ $repository = $img->getRepoName();
 68+
6969 $isCur = true;
7070 while($line = $img->nextHistoryLine()) { // assignment
7171 $vals = array();
@@ -97,7 +97,11 @@
9898 $img->resetHistory();
9999 }
100100
101 - $this->addPageSubItems($pageId, $data);
 101+ $this->getResult()->addValue(array ('query', 'pages', intval($pageId)),
 102+ 'imagerepository',
 103+ $repository);
 104+ if (!empty($data))
 105+ $this->addPageSubItems($pageId, $data);
102106 }
103107 }
104108 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r24705Merged revisions 24632-24693 via svnmerge from...david19:15, 9 August 2007

Status & tagging log