From d015dd001f62afa610c1cabb5e1a41e12346cbbd Mon Sep 17 00:00:00 2001 From: Fomafix Date: Thu, 18 Dec 2014 13:14:54 +0000 Subject: [PATCH] API: Return parsedsummary on onlypst This updates the summary preview on "Show changes" for LivePreview. Bug: T84836 Change-Id: I169fd1e1b6ed4d4f43ca69f92bc7a38e7823ddae --- includes/api/ApiParse.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.20.1