From 928e011e06d7a1a78c89ae229fdf0317181a9c75 Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Fri, 3 Apr 2015 17:53:19 +0530 Subject: [PATCH] 4.6 Upgrade Error Fix --- CRM/Upgrade/Incremental/sql/4.6.0.mysql.tpl | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/CRM/Upgrade/Incremental/sql/4.6.0.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.6.0.mysql.tpl index 453acd8143..a6d59255ae 100644 --- a/CRM/Upgrade/Incremental/sql/4.6.0.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.6.0.mysql.tpl @@ -28,12 +28,21 @@ SET name = 'Author Only' WHERE option_group_id = @option_group_id_notePrivacy AND value = 1; --These labels were never translated so just copy them over as names -UPDATE civicrm_option_value v, civicrm_option_group g -SET v.name = {localize field='label'}v.label{/localize} -WHERE g.id = v.option_group_id AND g.name IN -('group_type', 'safe_file_extension', 'wysiwyg_editor'); +{if $multilingual} + {foreach from=$locales item=locale} + UPDATE civicrm_option_value v, civicrm_option_group g + SET v.name = v.label_{$locale} + WHERE g.id = v.option_group_id AND g.name IN + ('group_type', 'safe_file_extension', 'wysiwyg_editor'); + {/foreach} +{else} + UPDATE civicrm_option_value v, civicrm_option_group g + SET v.name = v.label + WHERE g.id = v.option_group_id AND g.name IN + ('group_type', 'safe_file_extension', 'wysiwyg_editor'); +{/if} --This one is wierd. What the heck is this anyway? UPDATE civicrm_option_value v, civicrm_option_group g SET v.name = v.value -WHERE g.id = v.option_group_id AND g.name = 'redaction_rule'; \ No newline at end of file +WHERE g.id = v.option_group_id AND g.name = 'redaction_rule'; -- 2.25.1