From: eileen Date: Tue, 2 Aug 2016 02:42:36 +0000 (+1200) Subject: CRM-19165 Use permission sensitive function to create strip-numeric function X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1b31daf600266d82994a05de1a6514c684678be7;p=civicrm-core.git CRM-19165 Use permission sensitive function to create strip-numeric function --- 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',