R
RussianHedgehog

  • Apr 24, 2019
  • Joined Apr 15, 2019
  • 0 best answers
  • modify the method postReply, near line 2007.

    $body = $this->addMessageThread($msg['body']);
    $email->send($this->getOwner(), $msg['subj'], $body, $attachments, $options);
    
  • Thank you diegomesa.

    This code works osTicket (v1.9.12):

    Add a new method in class.ticket.php.

    function addMessageThread($body) {    
    $sql = 'SELECT poster, body FROM '.TICKET_THREAD_TABLE.' WHERE ticket_id=' .db_input($this->getId()) .' ORDER BY created DESC'; $result = db_query($sql); $i=0; while($row = db_fetch_array($result)) { if($i > 0) { $body .= '<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">'; $body .= $row['body']; $body .= '</div>'; } else { $body .= "<br/><br/><h2>THREAD:</h2>"; } $i=$i+1; } return $body; }