Commit 1f6f6e93 authored by jaapjansma's avatar jaapjansma

Fixed #8

parent ee1d2dea
......@@ -28,6 +28,8 @@ function civicrm_api3_form_processor_instance_Import($params) {
if (empty($params['file'])) {
// default behaviour
$returnValues['import'] = $exporter->importFromExtensions();
// Clear the cache
\Civi\FormProcessor\Utils\Cache::clear();
$returnValues['is_error'] = 0;
} else {
......@@ -41,6 +43,8 @@ function civicrm_api3_form_processor_instance_Import($params) {
}
$returnValues['import'] = $exporter->import($data, $params['file']);
$returnValues['import']['original_status'] = $status; // we might have adjusted it, so we know better
// Clear the cache
\Civi\FormProcessor\Utils\Cache::clear();
$returnValues['is_error'] = 0;
} else {
......
......@@ -16,6 +16,8 @@ function civicrm_api3_form_processor_instance_revert($params) {
$returnValues = array();
if ($exporter->revert($params['id'])) {
$returnValues = civicrm_api3('FormProcessorInstance', 'getsingle', array('id' => $params['id']));
// Clear the cache
\Civi\FormProcessor\Utils\Cache::clear();
} else {
return civicrm_api3_create_error('Could not revert form processor '.$params['id']);
}
......@@ -36,4 +38,4 @@ function _civicrm_api3_form_processor_instance_revert_spec(&$spec) {
'type' => CRM_Utils_Type::T_INT,
'api.required' => true
);
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment