I followed the steps in the first post, after only appling the changes to the class.ticket.php file I can no longer open up OSTicket, instead I get the following message.
Parse error: parse error in D:\Data\Web Sites\FTHelpDesk\include\class.ticket.php on line 166
Can anyone help with this?
I will post the code I have for the diffrent sections to see if anyone can spot if I have made a mistake somewhere, I am trying to add a new field called "Closed on Version" so when people find bugs in our program we can create a ticket for it and then when we close it can type the program version into a new field.
The field I created in the Database is called "closed_on_ver".
First part
class Ticket{
var $id;
var $extid;
var $email;
var $status;
var $created;
var $updated;
var $priority;
var $priority_id;
var $fullname;
var $staff_id;
var $dept_id;
var $dept_name;
var $subject;
var $overdue;
var $lastMsgId;
var $dept;
var $closed_on_ver;
Second Part
if(($res=db_query($sql)) && db_num_rows($res)):
$row=db_fetch_array($res);
$this->id =$row;
$this->extid =$row;
$this->email =$row;
$this->fullname =$row;
$this->status =$row;
$this->created =$row;
$this->updated =$row;
$this->lock_id =$row;
$this->priority_id=$row;
$this->priority=$row;
$this->staff_id =$row;
$this->dept_id =$row;
$this->dept_name =$row;
$this->subject =$row;
$this->overdue =$row;
$this->closed_on_ver =$row;
$this->row=$row;
Third Part - Whats the diffrence when some of them have "row" and then the variable in square brakcets?
//GET
function getId(){
return $this->id;
}
function getExtId(){
return $this->extid;
}
function getEmail(){
return $this->email;
}
function getName(){
return $this->fullname;
}
function getSubject() {
return $this->subject;
}
function getCreateDate(){
return $this->created;
}
function getUpdateDate(){
return $this->updated;
}
function getStatus(){
return $this->status;
}
function getDeptId(){
return $this->dept_id;
}
function getDeptName(){
return $this->dept_name;
}
function getPriorityId() {
return $this->priority_id;
}
function getPriority() {
return $this->priority;
}
function getPhone() {
return $this->row;
}
function getSource() {
return $this->row;
}
function getclosed_on_ver() {
return.$this->closed_on_ver;
}
function getIP() {
return $this->row;
}
Forth Part
function create($var,&$errors,$origin,$autorespond=true,$alertstaff=true) {
global $cfg,$thisclient,$_FILES;
$id=0;
$fields=array();
$fields = array('type'=>'string', 'required'=>1, 'error'=>'Name required');
$fields = array('type'=>'email', 'required'=>1, 'error'=>'Valid email required');
$fields = array('type'=>'string', 'required'=>1, 'error'=>'Subject required');
$fields = array('type'=>'string', 'required'=>0, 'error'=>'Program Version Required');
Last Part - Once again could someone explain whay some have $Var and some have Format: whilst others don't.
$extId=Ticket:();
$sql= 'INSERT INTO '.TICKET_TABLE.' SET created=NOW() '.
',ticketID='.db_input($extId).
',dept_id='.db_input($deptId).
',priority_id='.db_input($priorityId).
',email='.db_input($var).
',name='.db_input(Format:($var)).
',subject='.db_input(Format:($var)).
',phone='.db_input($var).
',ip_address='.db_input($ipaddress).
',closed_on_Ver='.db_input(Format:($var))
',source='.db_input($source);
Thanks for your time, I'm more of a HTML guy and have only been working on this for a few days.