From: Sam Reed Date: Sun, 17 Jul 2011 17:09:51 +0000 (+0000) Subject: Followup r92396 X-Git-Tag: 1.31.0-rc.0~28784 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=937c3bb69f20e114253d2b5f5c2970d25ea1e357;p=lhc%2Fweb%2Fwiklou.git Followup r92396 Using action=paraminfo to give help urls (and examples for that matter!!) look awful as a string with an encoded \n in the middle of it --- diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index 989e55b8a8..eac784e35e 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -94,7 +94,6 @@ class ApiParamInfo extends ApiBase { $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->getHelpUrls() ); $retval['version'] = implode( "\n", (array)$obj->getVersion() ); $retval['prefix'] = $obj->getModulePrefix(); @@ -116,6 +115,9 @@ class ApiParamInfo extends ApiBase { return $retval; } + $retval['helpurls'] = (array)$obj->getHelpUrls(); + $result->setIndexedTagName( $retval['helpurls'], 'helpurl' ); + $retval['parameters'] = array(); $paramDesc = $obj->getFinalParamDescription(); foreach ( $allowedParams as $n => $p ) { @@ -197,7 +199,6 @@ class ApiParamInfo extends ApiBase { // Errors $retval['errors'] = $this->parseErrors( $obj->getPossibleErrors() ); - $result->setIndexedTagName( $retval['errors'], 'error' ); return $retval;