/**
* Identify any enabled/disabled modules. Add new entities, update
* existing entities, and remove orphaned (stale) entities.
+ * @param bool $ignoreUpgradeMode
*
* @throws Exception
*/
- public function reconcile() {
+ public function reconcile($ignoreUpgradeMode = FALSE) {
+ // Do not reconcile whilst we are in upgrade mode
+ if (CRM_Core_Config::singleton()->isUpgradeMode() && !$ignoreUpgradeMode) {
+ return;
+ }
if ($error = $this->validate($this->getDeclarations())) {
throw new Exception($error);
}
if ($doUpdate) {
$defaults = [
'id' => $dao->entity_id,
- 'is_active' => 1, // FIXME: test whether is_active is valid
+ // FIXME: test whether is_active is valid
+ 'is_active' => 1,
];
$params = array_merge($defaults, $todo['params']);
$result = civicrm_api($dao->entity_type, 'create', $params);