API: Return parsedsummary on onlypst
authorFomafix <fomafix@googlemail.com>
Thu, 18 Dec 2014 13:14:54 +0000 (13:14 +0000)
committerTheDJ <hartman.wiki@gmail.com>
Sun, 15 Mar 2015 19:02:04 +0000 (19:02 +0000)
This updates the summary preview on "Show changes" for LivePreview.

Bug: T84836
Change-Id: I169fd1e1b6ed4d4f43ca69f92bc7a38e7823ddae

includes/api/ApiParse.php

index 83d2cbc..83e105b 100644 (file)
@@ -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;