X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FSMS%2FProvider.php;h=da800cb497845e0a09fc64cccd90f730eb3c2027;hb=19788b70cb49b5ef4dbfc41791bba7e61663d0b0;hp=0351467b491d5c3d9a44a8bb559b853f6f0cf820;hpb=a65f52b63ddf8b85bbf7abb98155fb2a9bf2a693;p=civicrm-core.git diff --git a/CRM/SMS/Provider.php b/CRM/SMS/Provider.php index 0351467b49..da800cb497 100644 --- a/CRM/SMS/Provider.php +++ b/CRM/SMS/Provider.php @@ -218,7 +218,8 @@ INNER JOIN civicrm_mailing_job mj ON mj.mailing_id = m.id AND mj.id = %1"; // find sender by phone number if $fromContactID not set by hook $formatFrom = '%' . $this->formatPhone($this->stripPhone($message->from), $like, "like"); $message->fromContactID = CRM_Core_DAO::singleValueQuery("SELECT contact_id FROM civicrm_phone JOIN civicrm_contact ON civicrm_contact.id = civicrm_phone.contact_id WHERE !civicrm_contact.is_deleted AND phone LIKE %1", array( - 1 => array($formatFrom, 'String'))); + 1 => array($formatFrom, 'String'), + )); } if (!$message->fromContactID) { @@ -254,7 +255,8 @@ INNER JOIN civicrm_mailing_job mj ON mj.mailing_id = m.id AND mj.id = %1"; // find recipient if $toContactID not set by hook if ($message->to) { $message->toContactID = CRM_Core_DAO::singleValueQuery("SELECT contact_id FROM civicrm_phone JOIN civicrm_contact ON civicrm_contact.id = civicrm_phone.contact_id WHERE !civicrm_contact.is_deleted AND phone LIKE %1", array( - 1 => array('%' . $message->to, 'String'))); + 1 => array('%' . $message->to, 'String'), + )); } else { $message->toContactID = $message->fromContactID;