Skip to content

Commit

Permalink
FIX Bad list of ticket on public interface for ticket emailcollector
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Oct 5, 2019
1 parent e90234c commit 3e5cd87
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions htdocs/public/ticket/list.php
Expand Up @@ -37,6 +37,7 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
Expand Down Expand Up @@ -95,7 +96,8 @@
$ret = $object->fetch('', '', $track_id);

if ($ret && $object->id > 0) {
// vérifie si l'adresse email est bien dans les contacts du ticket

// vérifie si l'adresse email est bien dans les contacts du ticket
$contacts = $object->liste_contact(-1, 'external');
foreach ($contacts as $contact) {
if ($contact['email'] == $email) {
Expand Down Expand Up @@ -124,7 +126,9 @@
$_SESSION['track_id_customer'] = $track_id;
}
}
if ($email == $object->origin_email) {

$emailorigin = CMailFile::getValidAddress($object->origin_email, 2);
if ($email == $emailorigin) {
$display_ticket_list = true;
$_SESSION['email_customer'] = $email;
$_SESSION['track_id_customer'] = $track_id;
Expand Down Expand Up @@ -638,7 +642,7 @@

// Statut
if (!empty($arrayfields['t.fk_statut']['checked'])) {
print '<td>';
print '<td class="nowraponall">';
$object->fk_statut = $obj->fk_statut;
print $object->getLibStatut(2);
print '</td>';
Expand Down

0 comments on commit 3e5cd87

Please sign in to comment.