Skip to content
Snippets Groups Projects
Commit 1f6f6e93 authored by jaapjansma's avatar jaapjansma
Browse files

Fixed #8

parent ee1d2dea
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment