From: Fomafix Date: Thu, 18 Dec 2014 13:14:54 +0000 (+0000) Subject: API: Return parsedsummary on onlypst X-Git-Tag: 1.31.0-rc.0~12089 X-Git-Url: http://git.cyclocoop.org/%22%20%20.%20generer_url_ecrire%28%22mots_tous%22%29%20.%20%22?a=commitdiff_plain;h=d015dd001f62afa610c1cabb5e1a41e12346cbbd;p=lhc%2Fweb%2Fwiklou.git API: Return parsedsummary on onlypst This updates the summary preview on "Show changes" for LivePreview. Bug: T84836 Change-Id: I169fd1e1b6ed4d4f43ca69f92bc7a38e7823ddae --- diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 83d2cbc0bd..83e105bb49 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -218,6 +218,14 @@ class ApiParse extends ApiBase { $result_array['wikitext'] = array(); ApiResult::setContent( $result_array['wikitext'], $this->content->serialize( $format ) ); } + if ( !is_null( $params['summary'] ) ) { + $result_array['parsedsummary'] = array(); + ApiResult::setContent( + $result_array['parsedsummary'], + Linker::formatComment( $params['summary'], $titleObj ) + ); + } + $result->addValue( null, $this->getModuleName(), $result_array ); return;