Anomie has uploaded a new change for review.

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

Change subject: Remove pre-1.25 API compatibility code
......................................................................

Remove pre-1.25 API compatibility code

Since this extension uses extension.json, it already requires 1.25+ so
no need to keep the old code around.

Change-Id: I47ae77b4558b7474dab21bff0106f94c3f2b664f
---
M api/ApiTemplateData.php
1 file changed, 8 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData 
refs/changes/94/311794/1

diff --git a/api/ApiTemplateData.php b/api/ApiTemplateData.php
index 14c38b6..82eed13 100644
--- a/api/ApiTemplateData.php
+++ b/api/ApiTemplateData.php
@@ -92,17 +92,15 @@
 
                        // HACK: don't let ApiResult's formatversion=1 
compatibility layer mangle our booleans
                        // to empty strings / absent properties
-                       if ( defined( 'ApiResult::META_BC_BOOLS' ) ) {
-                               foreach ( $data->params as &$param ) {
-                                       $param->{ApiResult::META_BC_BOOLS} = [ 
'required', 'suggested', 'deprecated' ];
-                               }
-                               unset( $param );
-
-                               $data->params->{ApiResult::META_TYPE} = 'kvp';
-                               $data->params->{ApiResult::META_KVP_KEY_NAME} = 
'key';
-                               
$data->params->{ApiResult::META_INDEXED_TAG_NAME} = 'param';
-                               ApiResult::setIndexedTagName( 
$data->paramOrder, 'p' );
+                       foreach ( $data->params as &$param ) {
+                               $param->{ApiResult::META_BC_BOOLS} = [ 
'required', 'suggested', 'deprecated' ];
                        }
+                       unset( $param );
+
+                       $data->params->{ApiResult::META_TYPE} = 'kvp';
+                       $data->params->{ApiResult::META_KVP_KEY_NAME} = 'key';
+                       $data->params->{ApiResult::META_INDEXED_TAG_NAME} = 
'param';
+                       ApiResult::setIndexedTagName( $data->paramOrder, 'p' );
 
                        $resp[$row->pp_page] = [
                                'title' => strval( $titles[$row->pp_page] ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47ae77b4558b7474dab21bff0106f94c3f2b664f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
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

Reply via email to