Hi,
I'm on osTicket RC5.
Other variables in templates doesn't work.
i've added some code to solve this, but variables are replaced by blank.
My code :
$search = array('/%id/','/%ticket/','/%email/','/%name/','/%subject/','/%topic/','/%phone/','/%status/','/%priority/',
'/%dept/','/%assigned_staff/','/%createdate/','/%duedate/','/%closedate/','/%url/', '/%localisation/' , '/%message/',
'/%response/' );
$replace = array($this->getId(),
$this->getExtId(),
$this->getEmail(),
$this->getName(),
$this->getSubject(),
$this->getHelpTopic(),
$this->getPhoneNumber(),
$this->getStatus(),
$this->getPriority(),
($dept?$dept->getName():''),
($staff?$staff->getName():''),
Format:($this->getCreateDate()),
Format:($this->getDueDate()),
Format:($this->getCloseDate()),
$cfg->getBaseUrl());
$this->getLocalisation();
$this->getMessage();
$this->getResponse();
return preg_replace($search,$replace,$text);
function load($id) {
$sql =' SELECT ticket.*,lock_id,dept_name,priority_desc, msg.message , resp.response FROM '.TICKET_TABLE.' ticket '.
' LEFT JOIN '.DEPT_TABLE.' dept ON ticket.dept_id=dept.dept_id '.
' LEFT JOIN '.TICKET_PRIORITY_TABLE.' pri ON ticket.priority_id=pri.priority_id '.
' LEFT JOIN '.TICKET_LOCK_TABLE.' tlock ON ticket.ticket_id=tlock.ticket_id AND tlock.expire>NOW() '.
' LEFT JOIN '.TICKET_MESSAGE_TABLE.' msg ON ticket.ticket_id = msg.ticket_id'.
' LEFT JOIN '.TICKET_RESPONSE_TABLE.' resp ON ticket.ticket_id = resp.ticket_id'.
' WHERE ticket.ticket_id='.db_input($id);
could someone help me?
Ps : sorry for the english