[MediaWiki-commits] [Gerrit] Update ApiResult handling for mediawiki/core change I7b37295e - change (mediawiki...BlueSpiceExtensions)

2015-02-23 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged.

Change subject: Update ApiResult handling for mediawiki/core change I7b37295e
..


Update ApiResult handling for mediawiki/core change I7b37295e

Change I7b37295e for mediawiki/core deprecates several methods, and more
importantly changes the format of the data returned from
ApiResult::getData(). This change should handle these differences in a
backwards-compatible manner.

Change-Id: I7b37295e8862b188d1f3b0cd07f66ac34629678d
---
M UEModulePDF/includes/PDFPageProvider.class.php
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved



diff --git a/UEModulePDF/includes/PDFPageProvider.class.php 
b/UEModulePDF/includes/PDFPageProvider.class.php
index 524521a..2ee58be 100644
--- a/UEModulePDF/includes/PDFPageProvider.class.php
+++ b/UEModulePDF/includes/PDFPageProvider.class.php
@@ -116,7 +116,13 @@
$oAPI = new ApiMain( $aAPIParams );
$oAPI-execute();
 
-   $aResult = $oAPI-getResultData();
+   if ( defined( 'ApiResult::META_CONTENT' ) ) {
+   $aResult = $oAPI-getResult()-getResultData();
+   $aResult = ApiResult::transformForBC( $aResult 
);
+   $aResult = ApiResult::removeMetadata( $aResult 
);
+   } else {
+   $aResult = $oAPI-getResultData();
+   }
 
foreach($aResult['parse']['categories'] as $aCat ) {
$aCategories[] = $aCat['*'];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b37295e8862b188d1f3b0cd07f66ac34629678d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Mglaser gla...@hallowelt.biz
Gerrit-Reviewer: Pigpen reym...@hallowelt.biz
Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update ApiResult handling for mediawiki/core change I7b37295e - change (mediawiki...BlueSpiceExtensions)

2015-02-17 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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

Change subject: Update ApiResult handling for mediawiki/core change I7b37295e
..

Update ApiResult handling for mediawiki/core change I7b37295e

Change I7b37295e for mediawiki/core deprecates several methods, and more
importantly changes the format of the data returned from
ApiResult::getData(). This change should handle these differences in a
backwards-compatible manner.

Change-Id: I7b37295e8862b188d1f3b0cd07f66ac34629678d
---
M UEModulePDF/includes/PDFPageProvider.class.php
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/81/191081/1

diff --git a/UEModulePDF/includes/PDFPageProvider.class.php 
b/UEModulePDF/includes/PDFPageProvider.class.php
index 524521a..2ee58be 100644
--- a/UEModulePDF/includes/PDFPageProvider.class.php
+++ b/UEModulePDF/includes/PDFPageProvider.class.php
@@ -116,7 +116,13 @@
$oAPI = new ApiMain( $aAPIParams );
$oAPI-execute();
 
-   $aResult = $oAPI-getResultData();
+   if ( defined( 'ApiResult::META_CONTENT' ) ) {
+   $aResult = $oAPI-getResult()-getResultData();
+   $aResult = ApiResult::transformForBC( $aResult 
);
+   $aResult = ApiResult::removeMetadata( $aResult 
);
+   } else {
+   $aResult = $oAPI-getResultData();
+   }
 
foreach($aResult['parse']['categories'] as $aCat ) {
$aCategories[] = $aCat['*'];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b37295e8862b188d1f3b0cd07f66ac34629678d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org

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