From eb45c3bf4e9c9a43fc87eef53d9a44947d4b864f Mon Sep 17 00:00:00 2001 From: Jaap Jansma <jaap.jansma@civicoop.org> Date: Tue, 17 Mar 2020 10:00:29 +0100 Subject: [PATCH] Fixed regression after import/export api change --- .../Converttitletoname.php | 2 +- api/v3/FormProcessorInstance/Import.php | 23 +++++-------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/api/v3/FormProcessorDefaultDataInput/Converttitletoname.php b/api/v3/FormProcessorDefaultDataInput/Converttitletoname.php index 8a108f3..fc17b97 100644 --- a/api/v3/FormProcessorDefaultDataInput/Converttitletoname.php +++ b/api/v3/FormProcessorDefaultDataInput/Converttitletoname.php @@ -25,7 +25,7 @@ function civicrm_api3_form_processor_default_data_input_converttitletoname($para * @return void * @see http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards */ -function _civicrm_api3_form_processor_input_converttitletoname_spec(&$spec) { +function _civicrm_api3_form_processor_default_data_input_converttitletoname_spec(&$spec) { $spec['title'] = array( 'title' => E::ts('Title'), 'type' => CRM_Utils_Type::T_STRING, diff --git a/api/v3/FormProcessorInstance/Import.php b/api/v3/FormProcessorInstance/Import.php index 1a31197..41bb5f7 100644 --- a/api/v3/FormProcessorInstance/Import.php +++ b/api/v3/FormProcessorInstance/Import.php @@ -10,6 +10,12 @@ use CRM_FormProcessor_ExtensionUtil as E; * @see http://wiki.civicrm.org/confluence/display/CRMDOC/API+Architecture+Standards */ function _civicrm_api3_form_processor_instance_Import_spec(&$spec) { + $spec['file'] = array( + 'title' => E::ts('Specification File'), + 'type' => CRM_Utils_Type::T_STRING, + 'description' => E::ts('If a file path is given, the JSON configuration will be imported from there'), + 'api.required' => false + ); } /** @@ -53,20 +59,3 @@ function civicrm_api3_form_processor_instance_Import($params) { } return $returnValues; } - -/** - * FormProcessorInstance.Import API specification (optional) - * This is used for documentation and validation. - * - * @param array $spec description of fields supported by this API call - * @return void - * @see http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards - */ -function _civicrm_api3_form_processor_instance_export_spec(&$spec) { - $spec['file'] = array( - 'title' => E::ts('Specification File'), - 'type' => CRM_Utils_Type::T_STRING, - 'description' => E::ts('If a file path is given, the JSON configuration will be imported from there'), - 'api.required' => false - ); -} -- GitLab