From c36fe5b04c12fb886f80c69a348127ab4249405a Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 9 Apr 2015 19:51:00 -0700 Subject: [PATCH] Extension.get API - Add support for API filters/options --- api/v3/Extension.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/v3/Extension.php b/api/v3/Extension.php index 11a2932f5a..b233e51299 100644 --- a/api/v3/Extension.php +++ b/api/v3/Extension.php @@ -254,17 +254,19 @@ function civicrm_api3_extension_get($params) { $statuses = CRM_Extension_System::singleton()->getManager()->getStatuses(); $mapper = CRM_Extension_System::singleton()->getMapper(); $result = array(); + $id = 0; foreach ($statuses as $key => $status) { //try { // $info = (array) $mapper->keyToInfo($key); //} catch (CRM_Extension_Exception $e) { $info = array(); + $info['id'] = $id++; // backward compatibility with indexing scheme $info['key'] = $key; //} $info['status'] = $status; $result[] = $info; } - return civicrm_api3_create_success($result); + return _civicrm_api3_basic_array_get('Extension', $params, $result, 'id', array('id', 'key', 'status')); } /** -- 2.25.1