Commit 0c9cb270 authored by jaapjansma's avatar jaapjansma
Browse files

Improved issue with importing.

parent 6977448f
Version 1.28 (not yet released) Version 1.28
============ ============
* Improved issue with importing.
Version 1.27 Version 1.27
============ ============
......
...@@ -244,10 +244,12 @@ class ExportToJson { ...@@ -244,10 +244,12 @@ class ExportToJson {
// Remove all form processors which are in code or overridden but not imported // Remove all form processors which are in code or overridden but not imported
if (!empty($importedIds)) { if (!empty($importedIds)) {
$dao = \CRM_Core_DAO::executeQuery("SELECT id, name FROM civicrm_form_processor_instance WHERE id NOT IN (".implode($importedIds, ",").") AND status IN (".\CRM_FormProcessor_Status::IN_CODE.", ".\CRM_FormProcessor_Status::OVERRIDDEN.")"); $dao = \CRM_Core_DAO::executeQuery("SELECT id, name, source_file FROM civicrm_form_processor_instance WHERE id NOT IN (".implode(",", $importedIds).") AND status IN (".\CRM_FormProcessor_Status::IN_CODE.", ".\CRM_FormProcessor_Status::OVERRIDDEN.")");
while ($dao->fetch()) { while ($dao->fetch()) {
\CRM_FormProcessor_BAO_FormProcessorInstance::deleteWithId($dao->id); if (!file_exists($dao->source_file)) {
$return['deleted form processors'][] = $dao->id.": ".$dao->name; \CRM_FormProcessor_BAO_FormProcessorInstance::deleteWithId($dao->id);
$return['deleted form processors'][] = $dao->id . ": " . $dao->name;
}
} }
} }
\Civi\FormProcessor\Utils\Cache::clear(); \Civi\FormProcessor\Utils\Cache::clear();
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url> <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
<url desc="Action-Provider Extension">https://lab.civicrm.org/extensions/action-provider</url> <url desc="Action-Provider Extension">https://lab.civicrm.org/extensions/action-provider</url>
</urls> </urls>
<releaseDate>2021-04-06</releaseDate> <releaseDate>2021-04-13</releaseDate>
<version>1.28-dev</version> <version>1.28</version>
<develStage>stable</develStage> <develStage>stable</develStage>
<compatibility> <compatibility>
<ver>4.7</ver> <ver>4.7</ver>
......
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