[MediaWiki-commits] [Gerrit] API: Return parsedsummary on onlypst - change (mediawiki/core)

2015-03-15 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: API: Return parsedsummary on onlypst
..


API: Return parsedsummary on onlypst

This updates the summary preview on Show changes for LivePreview.

Bug: T84836
Change-Id: I169fd1e1b6ed4d4f43ca69f92bc7a38e7823ddae
---
M includes/api/ApiParse.php
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  TheDJ: Looks good to me, approved
  jenkins-bot: Verified

Objections:
  Ricordisamoa: There's a problem with this change, please improve



diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index 83d2cbc..83e105b 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -218,6 +218,14 @@
$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;

-- 
To view, visit https://gerrit.wikimedia.org/r/180782
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I169fd1e1b6ed4d4f43ca69f92bc7a38e7823ddae
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Gerrit Patch Uploader gerritpatchuploa...@gmail.com
Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com
Gerrit-Reviewer: Ricordisamoa ricordisa...@openmailbox.org
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] API: Return parsedsummary on onlypst - change (mediawiki/core)

2014-12-18 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/180782

Change subject: API: Return parsedsummary on onlypst
..

API: Return parsedsummary on onlypst

This updates the summary preview on Show changes for LivePreview.

Bug: T84836
Change-Id: I169fd1e1b6ed4d4f43ca69f92bc7a38e7823ddae
---
M includes/api/ApiParse.php
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/180782/1

diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index ff91b92..ec1abf3 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -218,6 +218,14 @@
$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;

-- 
To view, visit https://gerrit.wikimedia.org/r/180782
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I169fd1e1b6ed4d4f43ca69f92bc7a38e7823ddae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits