--HR-224 Reinitialize entity cache during installation
authorNileema <nileema@nileema.(none)>
Fri, 17 Jan 2014 14:35:08 +0000 (20:05 +0530)
committerTim Otten <totten@civicrm.org>
Sun, 19 Jan 2014 00:47:31 +0000 (16:47 -0800)
CRM/Core/Invoke.php
xml/templates/listAll.tpl

index 516845ff4c8878b5ad1a44240e8125050d455c19..e1fe43347cacaaaec56294fc6ee905f3e4cfa671 100644 (file)
@@ -507,7 +507,7 @@ class CRM_Core_Invoke {
     ) {
       CRM_Core_DAO::triggerRebuild();
     }
-
+    CRM_Core_DAO_AllCoreTables::reinitializeCache(TRUE);
     CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
   }
 }
index 82fa900b7ebc7853479ef7fbb052b71fdf8a6abf..58359c00ccdff12ea7b4ced423cb69a1c5f7c6c9 100644 (file)
@@ -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}