From 03b261d54ca8fa2e3c9cea637676311ac7cf64e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 Mar 2020 19:11:34 +0100 Subject: [PATCH] Provide information of thirdparty, contact or project to SMS handler --- htdocs/core/class/CSMSFile.class.php | 15 +++++++++++++++ htdocs/core/class/html.formsms.class.php | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index a02f00fbac9..7c1713b9453 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -47,6 +47,11 @@ class CSMSFile public $message; public $nostop; + public $socid; + public $contactid; + + public $fk_project; + /** * CSMSFile @@ -125,7 +130,12 @@ class CSMSFile $sms->class=$this->class; $sms->nostop=$this->nostop; + $sms->socid=$this->socid; + $sms->contactid=$this->contactid; + $sms->project=$this->fk_project; + $res=$sms->SmsSend(); + if ($res <= 0) { $this->error=$sms->error; @@ -155,7 +165,12 @@ class CSMSFile $sms->message=$this->message; $sms->nostop=$this->nostop; + $sms->socid=$this->socid; + $sms->contactid=$this->contactid; + $sms->fk_project=$this->fk_project; + $res=$sms->SmsSend(); + $this->error = $sms->error; $this->errors = $sms->errors; if ($res <= 0) diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index d16ec9efc94..deb61bc0be8 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -293,7 +293,7 @@ function limitChars(textarea, limit, infodiv) //var_dump($_REQUEST);exit; print $form->selectarray("receiver", $liste, GETPOST("receiver"), 1); } - print ' '.$langs->trans("SmsInfoNumero"); + print ' '.$langs->trans("SmsInfoNumero").''; } print "\n"; }