Ensure new column is added to base table when fixing up dashboard and rebuild multili...
authorSeamus Lee <seamuslee001@gmail.com>
Fri, 2 Sep 2016 22:14:31 +0000 (08:14 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Sun, 4 Sep 2016 05:45:35 +0000 (15:45 +1000)
CRM/Upgrade/Incremental/php/FourSeven.php

index ef1ffa03c37ecefbabe55dec6be291d9cec59d00..1bfbe1068d1b5c642890d6a330209fb8623f5a6a 100644 (file)
@@ -804,7 +804,12 @@ FROM `civicrm_dashboard_contact` JOIN `civicrm_contact` WHERE civicrm_dashboard_
     CRM_Core_DAO::executeQuery('UPDATE civicrm_dashboard SET url = REPLACE(url, "&snippet=5", ""), fullscreen_url = REPLACE(fullscreen_url, "&snippet=5", "")');
 
     if (!CRM_Core_BAO_SchemaHandler::checkIfFieldExists('civicrm_dashboard', 'cache_minutes')) {
-      CRM_Core_DAO::executeQuery('ALTER TABLE civicrm_dashboard ADD COLUMN cache_minutes int unsigned NOT NULL DEFAULT 60 COMMENT "Number of minutes to cache dashlet content in browser localStorage."');
+      CRM_Core_DAO::executeQuery('ALTER TABLE civicrm_dashboard ADD COLUMN cache_minutes int unsigned NOT NULL DEFAULT 60 COMMENT "Number of minutes to cache dashlet content in browser localStorage."',
+         array(), TRUE, NULL, FALSE, FALSE);
+    }
+    if ($domain->locales) {
+      $locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales);
+      CRM_Core_I18n_Schema::rebuildMultilingualSchema($locales, NULL);
     }
 
     CRM_Core_DAO::executeQuery('UPDATE civicrm_dashboard SET cache_minutes = 1440 WHERE name = "blog"');