From 1ff0c37b70efd035971676b6266c5588b9dd0e00 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 20 Sep 2016 15:21:21 -0400 Subject: [PATCH] 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 --- api/ApiTemplateData.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/api/ApiTemplateData.php b/api/ApiTemplateData.php index 14c38b6f..82eed136 100644 --- a/api/ApiTemplateData.php +++ b/api/ApiTemplateData.php @@ -92,17 +92,15 @@ class ApiTemplateData extends ApiBase { // 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] ),