Skip to content

Commit 357c316

Browse files
authored
Merge pull request #444 from Hystepik/fix-display-of-ticket-in-myaccount
Fix prevent ticket to be chown if ticket public interface disabled
2 parents e510c36 + 30e6f56 commit 357c316

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
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 & 6 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("SELLYOURSAAS_SUPPORT_TICKET_CREATE") && empty($sellyoursaassupporturl) && ($action != 'presend' || !GETPOST('supportchannel', 'alpha'))) {
636636
print '
637637
<!-- BEGIN PAGE HEADER-->
638638
<!-- BEGIN PAGE HEAD -->
@@ -642,8 +642,6 @@ function groupticketchange(){
642642
<h1>'.$langs->trans("OldTickets").' <small>'.$langs->trans("OldTicketsDesc").'</small></h1>
643643
</div>
644644
<!-- END PAGE TITLE -->
645-
646-
647645
</div>
648646
<!-- END PAGE HEAD -->
649647
<!-- END PAGE HEADER-->';
@@ -670,7 +668,7 @@ function groupticketchange(){
670668
require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticketstats.class.php';
671669
$staticticket = new Ticket($db);
672670

673-
$sql = "SELECT t.rowid, t.ref, t.track_id, t.datec, t.subject, t.fk_statut";
671+
$sql = "SELECT t.rowid, t.ref, t.track_id, t.datec, t.subject, t.fk_statut, t.origin_email, t.track_id";
674672
$sql .= " FROM ".MAIN_DB_PREFIX."ticket as t";
675673
$sql .= " WHERE t.fk_soc = '".$db->escape($socid)."'"; // $socid is id of third party account
676674
$sql .= $db->order('t.fk_statut', 'ASC');
@@ -688,7 +686,6 @@ function groupticketchange(){
688686
$staticticket->id = $obj->rowid;
689687
$staticticket->ref = $obj->ref;
690688
$staticticket->track_id = $obj->track_id;
691-
$staticticket->fk_statut = $obj->fk_statut;
692689
$staticticket->status = $obj->fk_statut;
693690
$staticticket->progress = $obj->progress;
694691
$staticticket->subject = $obj->subject;
@@ -697,7 +694,7 @@ function groupticketchange(){
697694

698695
// Ref
699696
print '<td class="nowraponall">';
700-
print $staticticket->getNomUrl(1);
697+
print img_object("", $staticticket->picto, 'class="paddingright"'). $staticticket->ref;
701698
print "</td>\n";
702699

703700
// Creation date

0 commit comments

Comments
 (0)