r30151 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r30150‎ | r30151 | r30152 >
Date:12:28, 25 January 2008
Author:catrope
Status:old
Tags:
Comment:
Change action=paraminfo's format to something that won't render invalid XML
Modified paths:
  • /trunk/phase3/includes/api/ApiParamInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParamInfo.php
@@ -49,12 +49,15 @@
5050 {
5151 if(!isset($modArr[$m]))
5252 {
53 - $r['modules'][$m] = array('missing' => '');
 53+ $r['modules'][] = array('name' => $m, 'missing' => '');
5454 continue;
5555 }
5656 $obj = new $modArr[$m]($this->getMain(), $m);
57 - $r['modules'][$m] = $this->getClassInfo($obj);
 57+ $a = $this->getClassInfo($obj);
 58+ $a['name'] = $m;
 59+ $r['modules'][] = $a;
5860 }
 61+ $result->setIndexedTagName($r['modules'], 'module');
5962 }
6063 if(is_array($params['querymodules']))
6164 {
@@ -64,12 +67,15 @@
6568 {
6669 if(!isset($qmodArr[$qm]))
6770 {
68 - $r['querymodules'][$qm] = array('missing' => '');
 71+ $r['querymodules'][] = array('name' => $qm, 'missing' => '');
6972 continue;
7073 }
7174 $obj = new $qmodArr[$qm]($this, $qm);
72 - $r['querymodules'][$qm] = $this->getClassInfo($obj);
 75+ $a = $this->getClassInfo($obj);
 76+ $a['name'] = $qm;
 77+ $r['querymodules'][] = $a;
7378 }
 79+ $result->setIndexedTagName($r['querymodules'], 'module');
7480 }
7581 $result->addValue(null, $this->getModuleName(), $r);
7682 }

Status & tagging log