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
This commit is contained in:
Brad Jorsch 2016-09-20 15:21:21 -04:00
parent 4db2339096
commit 1ff0c37b70

View file

@ -92,17 +92,15 @@ class ApiTemplateData extends ApiBase {
// HACK: don't let ApiResult's formatversion=1 compatibility layer mangle our booleans // HACK: don't let ApiResult's formatversion=1 compatibility layer mangle our booleans
// to empty strings / absent properties // to empty strings / absent properties
if ( defined( 'ApiResult::META_BC_BOOLS' ) ) { foreach ( $data->params as &$param ) {
foreach ( $data->params as &$param ) { $param->{ApiResult::META_BC_BOOLS} = [ 'required', 'suggested', 'deprecated' ];
$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' );
} }
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] = [ $resp[$row->pp_page] = [
'title' => strval( $titles[$row->pp_page] ), 'title' => strval( $titles[$row->pp_page] ),