Anomie has uploaded a new change for review.

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

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 MsUpload.body.php
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MsUpload 
refs/changes/12/183612/1

diff --git a/MsUpload.body.php b/MsUpload.body.php
index 4c01367..cdaf8a0 100644
--- a/MsUpload.body.php
+++ b/MsUpload.body.php
@@ -46,7 +46,11 @@
                $enableWrite = true; // This is set to false by default, in the 
ApiMain constructor
                $api = new ApiMain( $params, $enableWrite );
                $api->execute();
-               $data = &$api->getResultData();
+               if ( defined( 'ApiResult::META_CONTENT' ) ) {
+                       $data = $api->getResult()->getResultData();
+               } else {
+                       $data = &$api->getResultData();
+               }
                return $mediaString;
 
 /* This code does the same and is better, but for some reason it doesn't 
update the categorylinks table
@@ -63,4 +67,4 @@
                return true;
 */
        }
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b37295e8862b188d1f3b0cd07f66ac34629678d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MsUpload
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to