API: Adding module prefix information to action=paraminfo
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 23 Jan 2008 17:28:45 +0000 (17:28 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 23 Jan 2008 17:28:45 +0000 (17:28 +0000)
includes/api/ApiParamInfo.php

index eb89ec5..2c9ef2e 100644 (file)
@@ -63,7 +63,7 @@ class ApiParamInfo extends ApiBase {
                                        $qmods[$qm] = array('missing' => '');\r
                                        continue;\r
                                }\r
-                               $obj = new $className($this, 'query');\r
+                               $obj = new $className($this, $qm);\r
                                $r['querymodules'][$qm] = $this->getClassInfo($obj);\r
                        }\r
                $result->addValue( null, $this->getModuleName(), $r );\r
@@ -74,6 +74,7 @@ class ApiParamInfo extends ApiBase {
                $result = $this->getResult();\r
                $retval['classname'] = get_class($obj);\r
                $retval['description'] = (is_array($obj->getDescription()) ? implode("\n", $obj->getDescription()) : $obj->getDescription());\r
+               $retval['prefix'] = $obj->getModulePrefix();\r
                $allowedParams = $obj->getAllowedParams();\r
                if(!is_array($allowedParams))\r
                        return $retval;\r