dev/core#2232 Permit hook_civicrm_container and some other prebootish hooks to run...
authorSeamus Lee <seamuslee001@gmail.com>
Tue, 8 Dec 2020 01:02:23 +0000 (12:02 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Tue, 8 Dec 2020 20:47:04 +0000 (07:47 +1100)
CRM/Upgrade/DispatchPolicy.php
CRM/Upgrade/Form.php

index de0fa72511d554bb988d2100a4ea0eeae97f93d9..a67c17e2aefe0e4d579619db4e54b86aa853a318 100644 (file)
@@ -59,6 +59,10 @@ class CRM_Upgrade_DispatchPolicy {
     // It's more restrictive, preventing interference from unexpected callpaths.
     $policies['upgrade.main'] = [
       'hook_civicrm_config' => 'run',
+      'hook_civicrm_container' => 'run',
+      'hook_civicrm_alterSettingsFolders' => 'run',
+      'hook_civicrm_alterSettingsMetaData' => 'run',
+      'hook_civicrm_permission' => 'run',
       '/^hook_civicrm_(pre|post)$/' => 'drop',
       '/^hook_civicrm_/' => $strict ? 'warn-drop' : 'drop',
       '/^civi\./' => 'run',
index 2ab3c1c7e8d87d909d729d1638c3e331336e53e9..5fb36b6475a885d4ec81aad298221ec6ea2a70f5 100644 (file)
@@ -780,6 +780,8 @@ SET    version = '$version'
     // Rebuild all triggers and re-enable logging if needed
     $logging = new CRM_Logging_Schema();
     $logging->fixSchemaDifferences();
+    // Force a rebuild of CiviCRM asset cache in case things have changed.
+    \Civi::service('asset_builder')->clear(FALSE);
   }
 
   /**