From 937c3bb69f20e114253d2b5f5c2970d25ea1e357 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 17 Jul 2011 17:09:51 +0000 Subject: [PATCH] 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 --- includes/api/ApiParamInfo.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.20.1