From 95a90cba8fe2ee2a3fdfd51584da189003ab137d Mon Sep 17 00:00:00 2001 From: Nileema Date: Fri, 17 Jan 2014 20:05:08 +0530 Subject: [PATCH] --HR-224 Reinitialize entity cache during installation --- CRM/Core/Invoke.php | 2 +- xml/templates/listAll.tpl | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Invoke.php b/CRM/Core/Invoke.php index 516845ff4c..e1fe43347c 100644 --- a/CRM/Core/Invoke.php +++ b/CRM/Core/Invoke.php @@ -507,7 +507,7 @@ class CRM_Core_Invoke { ) { CRM_Core_DAO::triggerRebuild(); } - + CRM_Core_DAO_AllCoreTables::reinitializeCache(TRUE); CRM_Core_ManagedEntities::singleton(TRUE)->reconcile(); } } diff --git a/xml/templates/listAll.tpl b/xml/templates/listAll.tpl index 82fa900b7e..58359c00cc 100644 --- a/xml/templates/listAll.tpl +++ b/xml/templates/listAll.tpl @@ -39,9 +39,9 @@ class CRM_Core_DAO_AllCoreTables {ldelim} static private $tables = null; static private $daoToClass = null; - static private function init() {ldelim} + static private function init($fresh = FALSE) {ldelim} static $init = FALSE; - if ($init) return; + if ($init && !$fresh) return; $entityTypes = array( {foreach from=$tables key=tableName item=table} @@ -115,5 +115,8 @@ class CRM_Core_DAO_AllCoreTables {ldelim} return array_search(self::getCanonicalClassName($className), self::tables()); {rdelim} + static public function reinitializeCache($fresh = FALSE) {ldelim} + self::init($fresh); + {rdelim} {rdelim} -- 2.25.1