/**
* @param string $tableName
* @param string $columnName
- * @param bool $l10n
+ * @param bool $l18n
*
*/
- public static function dropColumn($tableName, $columnName, $l10n = FALSE) {
+ public static function dropColumn($tableName, $columnName, $l18n = FALSE) {
if (self::checkIfFieldExists($tableName, $columnName)) {
$sql = "ALTER TABLE $tableName DROP COLUMN $columnName";
- if ($l10n) {
+ if ($l18n) {
CRM_Core_DAO::executeQuery($sql);
}
else {
CRM_Core_BAO_SchemaHandler::dropColumn('civicrm_dashboard', 'is_minimized');
CRM_Core_BAO_SchemaHandler::dropColumn('civicrm_dashboard', 'column_no');
CRM_Core_BAO_SchemaHandler::dropColumn('civicrm_dashboard', 'weight');
- 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 url = REPLACE(url, "&snippet=5", ""), fullscreen_url = REPLACE(fullscreen_url, "&snippet=5", "")');
UPDATE civicrm_dashboard SET name = 'casedashboard' WHERE (name IS NULL OR name = '') AND url LIKE "civicrm/dashlet/casedashboard?%";
-- CRM-19291 Fix names on dashlets where name is an empty string
+{if $multilingual}
+UPDATE civicrm_dashboard SET name = label_{$locales.0} WHERE name = '';
+{else}
UPDATE civicrm_dashboard SET name = label WHERE name = '';
+{/if}
-- CRM-18508 Display State/Province in event address in registration emails
{include file='../CRM/Upgrade/4.7.11.msg_template/civicrm_msg_template.tpl'}