FlushBackdrop.civi-setup.php - Update to work with setup UI
authorTim Otten <totten@civicrm.org>
Sat, 4 Jul 2020 04:44:14 +0000 (21:44 -0700)
committerTim Otten <totten@civicrm.org>
Mon, 6 Jul 2020 08:56:13 +0000 (01:56 -0700)
setup/plugins/installDatabase/FlushBackdrop.civi-setup.php

index 90a6df717495e0a09b79add9e44856ec25d5b073..1d2f862a501afacb7eba833c20676342ccd5f796 100644 (file)
@@ -16,6 +16,13 @@ if (!defined('CIVI_SETUP')) {
     }
     \Civi\Setup::log()->info(sprintf('[%s] Flush CMS metadata', basename(__FILE__)));
 
+    // If the admin activated the module first, and then ran web-based installer,
+    // then some hooks (eg hook_menu) may not fire until we fix this flag.
+    $initialized = &backdrop_static('civicrm_initialize', FALSE);
+    $failure = &backdrop_static('civicrm_initialize_failure', FALSE);
+    $initialized = TRUE;
+    $failure = FALSE;
+
     system_rebuild_module_data();
     module_enable(array('civicrm', 'civicrmtheme'));
     backdrop_flush_all_caches();