From 1b31daf600266d82994a05de1a6514c684678be7 Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 2 Aug 2016 14:42:36 +1200 Subject: [PATCH] CRM-19165 Use permission sensitive function to create strip-numeric function --- CRM/Contact/BAO/Contact.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 4711af7451..858ad46a4e 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -3280,8 +3280,9 @@ LEFT JOIN civicrm_address add2 ON ( add1.master_id = add2.id ) // Update phone table to populate phone_numeric field if (!$tableName || $tableName == 'civicrm_phone') { // Define stored sql function needed for phones - CRM_Core_DAO::executeQuery(self::DROP_STRIP_FUNCTION_43); - CRM_Core_DAO::executeQuery(self::CREATE_STRIP_FUNCTION_43); + $sqlTriggers = Civi::service('sql_triggers'); + $sqlTriggers->enqueueQuery(self::DROP_STRIP_FUNCTION_43); + $sqlTriggers->enqueueQuery(self::CREATE_STRIP_FUNCTION_43); $info[] = array( 'table' => array('civicrm_phone'), 'when' => 'BEFORE', -- 2.25.1