Skip to content

Commit 6a8198b

Browse files
author
Hystepik
committed
Fix prevent ticket to be chown if ticket public interface disabled
1 parent c7f8308 commit 6a8198b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

myaccount/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@
913913
$tickettocreate->fk_soc = $mythirdpartyaccount->id;
914914
$tickettocreate->socid = $mythirdpartyaccount->id;
915915
$tickettocreate->origin_replyto = $replyto;
916-
$tickettocreate->origin_email = $emailfrom;
916+
$tickettocreate->origin_email = $replyto;
917917
$tickettocreate->ip = $ipaddress;
918918
if (is_object($tmpcontract)) {
919919
$tickettocreate->fk_contract = $tmpcontract->id;

myaccount/tpl/support.tpl.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ function groupticketchange(){
632632
';
633633
}
634634

635-
if (isModEnabled("ticket") && empty($sellyoursaassupporturl) && ($action != 'presend' || !GETPOST('supportchannel', 'alpha'))) {
635+
if (isModEnabled("ticket") && getDolGlobalInt("TICKET_ENABLE_PUBLIC_INTERFACE") && empty($sellyoursaassupporturl) && ($action != 'presend' || !GETPOST('supportchannel', 'alpha'))) {
636636
print '
637637
<!-- BEGIN PAGE HEADER-->
638638
<!-- BEGIN PAGE HEAD -->
@@ -670,7 +670,7 @@ function groupticketchange(){
670670
require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticketstats.class.php';
671671
$staticticket = new Ticket($db);
672672

673-
$sql = "SELECT t.rowid, t.ref, t.track_id, t.datec, t.subject, t.fk_statut";
673+
$sql = "SELECT t.rowid, t.ref, t.track_id, t.datec, t.subject, t.fk_statut, t.origin_email, t.track_id";
674674
$sql .= " FROM ".MAIN_DB_PREFIX."ticket as t";
675675
$sql .= " WHERE t.fk_soc = '".$db->escape($socid)."'"; // $socid is id of third party account
676676
$sql .= $db->order('t.fk_statut', 'ASC');
@@ -688,7 +688,6 @@ function groupticketchange(){
688688
$staticticket->id = $obj->rowid;
689689
$staticticket->ref = $obj->ref;
690690
$staticticket->track_id = $obj->track_id;
691-
$staticticket->fk_statut = $obj->fk_statut;
692691
$staticticket->status = $obj->fk_statut;
693692
$staticticket->progress = $obj->progress;
694693
$staticticket->subject = $obj->subject;
@@ -697,7 +696,7 @@ function groupticketchange(){
697696

698697
// Ref
699698
print '<td class="nowraponall">';
700-
print $staticticket->getNomUrl(1);
699+
print img_object("", $staticticket->picto, 'class="paddingright"'). $staticticket->ref;
701700
print "</td>\n";
702701

703702
// Creation date

0 commit comments

Comments
 (0)