From: Roan Kattouw Date: Fri, 25 Jan 2008 12:28:18 +0000 (+0000) Subject: Change action=paraminfo's format to something that won't render invalid XML X-Git-Tag: 1.31.0-rc.0~49779 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=455eefb6fae4eadf9d141b6d016607eadccefb61;p=lhc%2Fweb%2Fwiklou.git Change action=paraminfo's format to something that won't render invalid XML --- diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index b14fafc642..563c20f514 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -49,12 +49,15 @@ class ApiParamInfo extends ApiBase { { if(!isset($modArr[$m])) { - $r['modules'][$m] = array('missing' => ''); + $r['modules'][] = array('name' => $m, 'missing' => ''); continue; } $obj = new $modArr[$m]($this->getMain(), $m); - $r['modules'][$m] = $this->getClassInfo($obj); + $a = $this->getClassInfo($obj); + $a['name'] = $m; + $r['modules'][] = $a; } + $result->setIndexedTagName($r['modules'], 'module'); } if(is_array($params['querymodules'])) { @@ -64,12 +67,15 @@ class ApiParamInfo extends ApiBase { { if(!isset($qmodArr[$qm])) { - $r['querymodules'][$qm] = array('missing' => ''); + $r['querymodules'][] = array('name' => $qm, 'missing' => ''); continue; } $obj = new $qmodArr[$qm]($this, $qm); - $r['querymodules'][$qm] = $this->getClassInfo($obj); + $a = $this->getClassInfo($obj); + $a['name'] = $qm; + $r['querymodules'][] = $a; } + $result->setIndexedTagName($r['querymodules'], 'module'); } $result->addValue(null, $this->getModuleName(), $r); }