X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiParse.php;h=b8d2641f9161c0e87129c0b26c2b9b6d30b58f6d;hb=2326d420c78ab71c1f13542973a695a80e6202f7;hp=287ffb7c0ebf10ca63a57b2305226e9a98c1ed79;hpb=8e8b4167ce356e3d516f4607c1c72a909bb3c24c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 287ffb7c0e..b8d2641f91 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -340,6 +340,9 @@ class ApiParse extends ApiBase { if ( isset( $prop['sections'] ) ) { $result_array['sections'] = $p_result->getSections(); } + if ( isset( $prop['parsewarnings'] ) ) { + $result_array['parsewarnings'] = $p_result->getWarnings(); + } if ( isset( $prop['displaytitle'] ) ) { $result_array['displaytitle'] = $p_result->getDisplayTitle() ?: @@ -452,6 +455,7 @@ class ApiParse extends ApiBase { 'modulestyles' => 'm', 'properties' => 'pp', 'limitreportdata' => 'lr', + 'parsewarnings' => 'pw' ]; $this->setIndexedTagNames( $result_array, $result_mapping ); $result->addValue( null, $this->getModuleName(), $result_array ); @@ -751,7 +755,8 @@ class ApiParse extends ApiBase { ], 'prop' => [ ApiBase::PARAM_DFLT => 'text|langlinks|categories|links|templates|' . - 'images|externallinks|sections|revid|displaytitle|iwlinks|properties', + 'images|externallinks|sections|revid|displaytitle|iwlinks|' . + 'properties|parsewarnings', ApiBase::PARAM_ISMULTI => true, ApiBase::PARAM_TYPE => [ 'text', @@ -777,6 +782,7 @@ class ApiParse extends ApiBase { 'limitreportdata', 'limitreporthtml', 'parsetree', + 'parsewarnings' ], ApiBase::PARAM_HELP_MSG_PER_VALUE => [ 'parsetree' => [ 'apihelp-parse-paramvalue-prop-parsetree', CONTENT_MODEL_WIKITEXT ],