Fix phpunit
This commit is contained in:
parent
9dfb7b4328
commit
66f21fc1d0
@ -143,7 +143,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||||||
if (!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) && empty($object->context['disableticketemail'])) {
|
if (!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) && empty($object->context['disableticketemail'])) {
|
||||||
$sendto = empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? '' : $conf->global->TICKET_NOTIFICATION_EMAIL_TO;
|
$sendto = empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? '' : $conf->global->TICKET_NOTIFICATION_EMAIL_TO;
|
||||||
if ($sendto) {
|
if ($sendto) {
|
||||||
$this->composeAndSendAdminMessage($sendto, $subject_admin, $body_admin, $object, $langs, $conf);
|
$this->composeAndSendAdminMessage($sendto, $subject_admin, $body_admin, $object, $langs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,6 +154,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||||||
//if contact selected send to email's contact else send to email's thirdparty
|
//if contact selected send to email's contact else send to email's thirdparty
|
||||||
|
|
||||||
$contactid = GETPOST('contactid', 'alpha');
|
$contactid = GETPOST('contactid', 'alpha');
|
||||||
|
$res = 0;
|
||||||
|
|
||||||
if (!empty($contactid)) {
|
if (!empty($contactid)) {
|
||||||
$contact = new Contact($this->db);
|
$contact = new Contact($this->db);
|
||||||
@ -197,7 +198,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||||||
if (!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) && empty($object->context['disableticketemail'])) {
|
if (!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) && empty($object->context['disableticketemail'])) {
|
||||||
$sendto = empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? '' : $conf->global->TICKET_NOTIFICATION_EMAIL_TO;
|
$sendto = empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? '' : $conf->global->TICKET_NOTIFICATION_EMAIL_TO;
|
||||||
if ($sendto) {
|
if ($sendto) {
|
||||||
$this->composeAndSendAdminMessage($sendto, $subject_admin, $body_admin, $object, $langs, $conf);
|
$this->composeAndSendAdminMessage($sendto, $subject_admin, $body_admin, $object, $langs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,6 +212,8 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||||||
}
|
}
|
||||||
|
|
||||||
$contactid = GETPOST('contactid', 'int');
|
$contactid = GETPOST('contactid', 'int');
|
||||||
|
$res = 0;
|
||||||
|
|
||||||
if ($contactid > 0) {
|
if ($contactid > 0) {
|
||||||
$contact = new Contact($this->db);
|
$contact = new Contact($this->db);
|
||||||
$res = $contact->fetch($contactid);
|
$res = $contact->fetch($contactid);
|
||||||
@ -249,17 +252,18 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Composes and sends a message concerning a ticket, to be sent to admin address.
|
* Composes and sends a message concerning a ticket, to be sent to admin address.
|
||||||
|
*
|
||||||
* @param string $sendto Addresses to send the mail, format "first@address.net, second@address.net," etc.
|
* @param string $sendto Addresses to send the mail, format "first@address.net, second@address.net," etc.
|
||||||
* @param string $base_subject email subject. Non-translated string.
|
* @param string $base_subject email subject. Non-translated string.
|
||||||
* @param string $body email body (first line). Non-translated string.
|
* @param string $body email body (first line). Non-translated string.
|
||||||
* @param Ticket $object the ticket thet the email refers to
|
* @param Ticket $object the ticket thet the email refers to
|
||||||
* @param Translate $langs the translation object
|
* @param Translate $langs the translation object
|
||||||
* @param conf $conf Object conf
|
* @return void
|
||||||
*
|
|
||||||
* @return none
|
|
||||||
*/
|
*/
|
||||||
private function composeAndSendAdminMessage($sendto, $base_subject, $body, Ticket $object, Translate $langs, $conf)
|
private function composeAndSendAdminMessage($sendto, $base_subject, $body, Ticket $object, Translate $langs)
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
// Init to avoid errors
|
// Init to avoid errors
|
||||||
$filepath = array();
|
$filepath = array();
|
||||||
$filename = array();
|
$filename = array();
|
||||||
@ -317,18 +321,19 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Composes and sends a message concerning a ticket, to be sent to customer addresses.
|
* Composes and sends a message concerning a ticket, to be sent to customer addresses.
|
||||||
|
*
|
||||||
* @param string $sendto Addresses to send the mail, format "first@address.net, second@address.net, " etc.
|
* @param string $sendto Addresses to send the mail, format "first@address.net, second@address.net, " etc.
|
||||||
* @param string $base_subject email subject. Non-translated string.
|
* @param string $base_subject email subject. Non-translated string.
|
||||||
* @param string $body email body (first line). Non-translated string.
|
* @param string $body email body (first line). Non-translated string.
|
||||||
* @param string $see_ticket string indicating the ticket public address
|
* @param string $see_ticket string indicating the ticket public address
|
||||||
* @param Ticket $object the ticket thet the email refers to
|
* @param Ticket $object the ticket thet the email refers to
|
||||||
* @param Translate $langs the translation object
|
* @param Translate $langs the translation object
|
||||||
* @param conf $conf Object conf
|
* @return void
|
||||||
*
|
|
||||||
* @return none
|
|
||||||
*/
|
*/
|
||||||
private function composeAndSendCustomerMessage($sendto, $base_subject, $body, $see_ticket, Ticket $object, Translate $langs, $conf)
|
private function composeAndSendCustomerMessage($sendto, $base_subject, $body, $see_ticket, Ticket $object, Translate $langs)
|
||||||
{
|
{
|
||||||
|
global $conf, $user;
|
||||||
|
|
||||||
// Init to avoid errors
|
// Init to avoid errors
|
||||||
$filepath = array();
|
$filepath = array();
|
||||||
$filename = array();
|
$filename = array();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user