From 37044cde601f0a1b9a7e1bfc0b406ca5ee783539 Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Thu, 30 Jan 2014 16:07:16 -0500 Subject: [PATCH] CRM-14147: Fix 4.1 to 4.2 upgrade in non-english (ex: french, where the profileTitle may have an apostrophe in it. --- CRM/Upgrade/Incremental/php/FourTwo.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CRM/Upgrade/Incremental/php/FourTwo.php b/CRM/Upgrade/Incremental/php/FourTwo.php index cb088db0b9..1345c74ac8 100644 --- a/CRM/Upgrade/Incremental/php/FourTwo.php +++ b/CRM/Upgrade/Incremental/php/FourTwo.php @@ -762,13 +762,19 @@ AND cli.entity_id IS NULL AND cp.fee_amount IS NOT NULL"; static function task_4_2_alpha1_eventProfile(CRM_Queue_TaskContext $ctx) { $upgrade = new CRM_Upgrade_Form(); $profileTitle = ts('Your Registration Info'); + $sql = " INSERT INTO civicrm_uf_group (is_active, group_type, title, help_pre, help_post, limit_listings_group_id, post_URL, add_to_group_id, add_captcha, is_map, is_edit_link, is_uf_link, is_update_dupe, cancel_URL, is_cms_user, notify, is_reserved, name, created_id, created_date, is_proximity_search) VALUES - (1, 'Individual, Contact', '{$profileTitle}', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, 0, NULL, 0, 'event_registration', NULL, NULL, 0); + (1, 'Individual, Contact', %1, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, 0, NULL, 0, 'event_registration', NULL, NULL, 0); "; - CRM_Core_DAO::executeQuery($sql); + + $params = array( + 1 => array($profileTitle, 'String'), + ); + + CRM_Core_DAO::executeQuery($sql, $params); $eventRegistrationId = CRM_Core_DAO::singleValueQuery('SELECT LAST_INSERT_ID()'); $sql = " -- 2.25.1