Followup r86622: add initial QUnit test cases for jquery.textSelection module.
[lhc/web/wiklou.git] / includes / api / ApiParamInfo.php
index 323c36f..6ba115e 100644 (file)
@@ -93,8 +93,8 @@ class ApiParamInfo extends ApiBase {
                $result = $this->getResult();
                $retval['classname'] = get_class( $obj );
                $retval['description'] = implode( "\n", (array)$obj->getDescription() );
-               $retval['examples'] = implode( "\n", (array)$obj->getExamples() );
-               $retval['helpurl'] = implode( "\n", (array)$obj->getHelpUrl() );
+               $examples = (array)$obj->getExamples();
+               $retval['examples'] = implode( "\n", $examples );
                $retval['version'] = implode( "\n", (array)$obj->getVersion() );
                $retval['prefix'] = $obj->getModulePrefix();
 
@@ -116,6 +116,12 @@ class ApiParamInfo extends ApiBase {
                        return $retval;
                }
 
+               $retval['helpurls'] = (array)$obj->getHelpUrls();
+               $result->setIndexedTagName( $retval['helpurls'], 'helpurl' );
+
+               $retval['allexamples'] = $examples;
+               $result->setIndexedTagName( $retval['allexamples'], 'example' );
+
                $retval['parameters'] = array();
                $paramDesc = $obj->getFinalParamDescription();
                foreach ( $allowedParams as $n => $p ) {
@@ -197,7 +203,6 @@ class ApiParamInfo extends ApiBase {
 
                // Errors
                $retval['errors'] = $this->parseErrors( $obj->getPossibleErrors() );
-
                $result->setIndexedTagName( $retval['errors'], 'error' );
 
                return $retval;
@@ -239,7 +244,7 @@ class ApiParamInfo extends ApiBase {
                );
        }
 
-       public function getHelpUrl() {
+       public function getHelpUrls() {
                return 'http://www.mediawiki.org/wiki/API:Parameter_information';
        }