Fix #180
This commit is contained in:
parent
978c09b029
commit
04ef076448
6 changed files with 249 additions and 253 deletions
|
@ -6,12 +6,12 @@
|
||||||
*/
|
*/
|
||||||
class Assigned{
|
class Assigned{
|
||||||
|
|
||||||
private $user; /**< The id of the user being assigned */
|
private $user; /**< The id of the user being assigned */
|
||||||
private $ticket; /**< The id of the ticket being assigned */
|
private $ticket; /**< The id of the ticket being assigned */
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assigns a ticket to a user or returns an error message.
|
* Assigns a ticket to a user or returns an error message.
|
||||||
* It will first check if the ticket isn't already assigned, if not, it will create a new 'assigned' entry.
|
* It will first check if the ticket isn't already assigned, if not, it will create a new 'assigned' entry.
|
||||||
|
@ -30,10 +30,10 @@ class Assigned{
|
||||||
}else{
|
}else{
|
||||||
return "ALREADY_ASSIGNED";
|
return "ALREADY_ASSIGNED";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unassign a ticket being coupled to a user or return an error message.
|
* Unassign a ticket being coupled to a user or return an error message.
|
||||||
* It will first check if the ticket is assigned, if this is indeed the case it will delete the 'assigned' entry.
|
* It will first check if the ticket is assigned, if this is indeed the case it will delete the 'assigned' entry.
|
||||||
|
@ -52,9 +52,9 @@ class Assigned{
|
||||||
}else{
|
}else{
|
||||||
return "NOT_ASSIGNED";
|
return "NOT_ASSIGNED";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the (external) id of the user assigned to a ticket
|
* Get the (external) id of the user assigned to a ticket
|
||||||
* @param $ticket_id the Id of the ticket that's being queried
|
* @param $ticket_id the Id of the ticket that's being queried
|
||||||
|
@ -65,11 +65,11 @@ class Assigned{
|
||||||
$statement = $dbl->execute("SELECT ticket_user.ExternId FROM `assigned` JOIN `ticket_user` ON assigned.User = ticket_user.TUserId WHERE `Ticket` = :ticket_id", Array('ticket_id' => $ticket_id));
|
$statement = $dbl->execute("SELECT ticket_user.ExternId FROM `assigned` JOIN `ticket_user` ON assigned.User = ticket_user.TUserId WHERE `Ticket` = :ticket_id", Array('ticket_id' => $ticket_id));
|
||||||
$user_id = $statement->fetch();
|
$user_id = $statement->fetch();
|
||||||
return $user_id['ExternId'];
|
return $user_id['ExternId'];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a ticket is already assigned (in case the user_id param is used, it will check if it's assigned to that user)
|
* Check if a ticket is already assigned (in case the user_id param is used, it will check if it's assigned to that user)
|
||||||
* @param $ticket_id the Id of the ticket that's being queried
|
* @param $ticket_id the Id of the ticket that's being queried
|
||||||
|
@ -79,26 +79,26 @@ class Assigned{
|
||||||
public static function isAssigned( $ticket_id, $user_id = 0) {
|
public static function isAssigned( $ticket_id, $user_id = 0) {
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
//check if ticket is already assigned
|
//check if ticket is already assigned
|
||||||
|
|
||||||
if($user_id == 0 && $dbl->select("`assigned`", array('ticket_id' => $ticket_id), "`Ticket` = :ticket_id")->rowCount() ){
|
if($user_id == 0 && $dbl->select("`assigned`", array('ticket_id' => $ticket_id), "`Ticket` = :ticket_id")->rowCount() ){
|
||||||
return true;
|
return true;
|
||||||
}else if( $dbl->select("`assigned`", array('ticket_id' => $ticket_id, 'user_id' => $user_id), "`Ticket` = :ticket_id and `User` = :user_id")->rowCount() ){
|
}else if( $dbl->select("`assigned`", array('ticket_id' => $ticket_id, 'user_id' => $user_id), "`Ticket` = :ticket_id and `User` = :user_id")->rowCount() ){
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constructor.
|
* A constructor.
|
||||||
* Empty constructor
|
* Empty constructor
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets the object's attributes.
|
* sets the object's attributes.
|
||||||
* @param $values should be an array of the form array('User' => user_id, 'Ticket' => ticket_id).
|
* @param $values should be an array of the form array('User' => user_id, 'Ticket' => ticket_id).
|
||||||
|
@ -107,25 +107,25 @@ class Assigned{
|
||||||
$this->setUser($values['User']);
|
$this->setUser($values['User']);
|
||||||
$this->setTicket($values['Ticket']);
|
$this->setTicket($values['Ticket']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates a new 'assigned' entry.
|
* creates a new 'assigned' entry.
|
||||||
* this method will use the object's attributes for creating a new 'assigned' entry in the database.
|
* this method will use the object's attributes for creating a new 'assigned' entry in the database.
|
||||||
*/
|
*/
|
||||||
public function create() {
|
public function create() {
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$dbl->insert("`assigned`", Array('User' => $this->getUser(), 'Ticket' => $this->getTicket());
|
$dbl->insert("`assigned`", Array('User' => $this->getUser(), 'Ticket' => $this->getTicket()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* deletes an existing 'assigned' entry.
|
* deletes an existing 'assigned' entry.
|
||||||
* this method will use the object's attributes for deleting an existing 'assigned' entry in the database.
|
* this method will use the object's attributes for deleting an existing 'assigned' entry in the database.
|
||||||
*/
|
*/
|
||||||
public function delete() {
|
public function delete() {
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$dbl->delete("`assigned`", array('user_id' => $this->getUser() ,'ticket_id' => $this->getTicket(), "`User` = :user_id and `Ticket` = :ticket_id");
|
$dbl->delete("`assigned`", array('user_id' => $this->getUser() ,'ticket_id' => $this->getTicket(), "`User` = :user_id and `Ticket` = :ticket_id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -139,25 +139,25 @@ class Assigned{
|
||||||
$row = $statement->fetch();
|
$row = $statement->fetch();
|
||||||
$this->set($row);
|
$this->set($row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////Getters////////////////////////////////////////////////////
|
////////////////////////////////////////////Getters////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get user attribute of the object.
|
* get user attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getUser(){
|
public function getUser(){
|
||||||
return $this->user;
|
return $this->user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get ticket attribute of the object.
|
* get ticket attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getTicket(){
|
public function getTicket(){
|
||||||
return $this->ticket;
|
return $this->ticket;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -167,7 +167,7 @@ class Assigned{
|
||||||
public function setUser($u){
|
public function setUser($u){
|
||||||
$this->user = $u;
|
$this->user = $u;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set ticket attribute of the object.
|
* set ticket attribute of the object.
|
||||||
* @param $t integer id of the ticket
|
* @param $t integer id of the ticket
|
||||||
|
@ -175,6 +175,6 @@ class Assigned{
|
||||||
public function setTicket($t){
|
public function setTicket($t){
|
||||||
$this->ticket = $t;
|
$this->ticket = $t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,30 +240,26 @@ class DBLayer {
|
||||||
* @param array $data array of data to insert in format('fieldname' => $value,....). 'fieldname' must be a field in that table.
|
* @param array $data array of data to insert in format('fieldname' => $value,....). 'fieldname' must be a field in that table.
|
||||||
* @throws error in inserting.
|
* @throws error in inserting.
|
||||||
*/
|
*/
|
||||||
public function insert( $tb_name, $data ) {
|
public function insert($tb_name, $data, $datafunc = array()) {
|
||||||
$this->useDb();
|
$this->useDb();
|
||||||
$field_values = ':' . implode( ',:', array_keys( $data ) );
|
$field_options = implode(',', array_merge(array_keys($data), array_keys($datafunc)));
|
||||||
$field_options = implode( ',', array_keys( $data ) );
|
$field_values = implode(',', array_merge(array(':' . implode(',:', array_keys($data))), array_values($datafunc)));
|
||||||
try {
|
try {
|
||||||
$sth = $this -> PDO -> prepare( "INSERT INTO $tb_name ($field_options) VALUE ($field_values)" );
|
$sth = $this->PDO->prepare("INSERT INTO $tb_name ($field_options) VALUE ($field_values)");
|
||||||
foreach ( $data as $key => $value )
|
foreach ($data as $key => $value) {
|
||||||
{
|
$sth->bindValue(":$key", $value);
|
||||||
|
}
|
||||||
$sth -> bindValue( ":$key", $value );
|
$this->PDO->beginTransaction();
|
||||||
}
|
|
||||||
$this -> PDO -> beginTransaction();
|
|
||||||
// execution
|
// execution
|
||||||
$sth -> execute();
|
$sth->execute();
|
||||||
$this -> PDO -> commit();
|
$this->PDO->commit();
|
||||||
|
|
||||||
}
|
|
||||||
catch ( Exception $e )
|
|
||||||
{
|
|
||||||
// for rolling back the changes during transaction
|
|
||||||
$this -> PDO -> rollBack();
|
|
||||||
throw new Exception( "error in inserting" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
catch (Exception $e) {
|
||||||
|
// for rolling back the changes during transaction
|
||||||
|
$this->PDO->rollBack();
|
||||||
|
throw $e; // new Exception("error in inserting");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete database entery using prepared statement.
|
* Delete database entery using prepared statement.
|
||||||
|
|
|
@ -3,16 +3,16 @@
|
||||||
* Handles the forwarding of a ticket to a support_group. This is being used to transfer tickets to different groups (eg Developers, Website-Team, SupportGroup etc..)
|
* Handles the forwarding of a ticket to a support_group. This is being used to transfer tickets to different groups (eg Developers, Website-Team, SupportGroup etc..)
|
||||||
* The idea is that someone can easily forward a ticket to a group and by doing that, the moderators that are in that group will receive the ticket in their todo queue.
|
* The idea is that someone can easily forward a ticket to a group and by doing that, the moderators that are in that group will receive the ticket in their todo queue.
|
||||||
* @author Daan Janssens, mentored by Matthew Lagoe
|
* @author Daan Janssens, mentored by Matthew Lagoe
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class Forwarded{
|
class Forwarded{
|
||||||
|
|
||||||
private $group; /**< The id of the group to which the ticket is being forwarded */
|
private $group; /**< The id of the group to which the ticket is being forwarded */
|
||||||
private $ticket; /**< The id of the ticket being forwarded */
|
private $ticket; /**< The id of the ticket being forwarded */
|
||||||
|
|
||||||
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forward a ticket to a group, also removes the previous group where it was forwarded to.
|
* Forward a ticket to a group, also removes the previous group where it was forwarded to.
|
||||||
* It will first check if the ticket is already forwarded, if that's the case, it will delete that entry.
|
* It will first check if the ticket is already forwarded, if that's the case, it will delete that entry.
|
||||||
|
@ -32,10 +32,10 @@ class Forwarded{
|
||||||
$forward->set(array('Group' => $group_id, 'Ticket' => $ticket_id));
|
$forward->set(array('Group' => $group_id, 'Ticket' => $ticket_id));
|
||||||
$forward->create();
|
$forward->create();
|
||||||
return "SUCCESS_FORWARDED";
|
return "SUCCESS_FORWARDED";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the id of the group a ticket is forwarded to.
|
* get the id of the group a ticket is forwarded to.
|
||||||
* @param $ticket_id the id of the ticket.
|
* @param $ticket_id the id of the ticket.
|
||||||
|
@ -46,8 +46,8 @@ class Forwarded{
|
||||||
$forw->load($ticket_id);
|
$forw->load($ticket_id);
|
||||||
return $forw->getGroup();
|
return $forw->getGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check if the ticket is forwarded
|
* check if the ticket is forwarded
|
||||||
* @param $ticket_id the id of the ticket.
|
* @param $ticket_id the id of the ticket.
|
||||||
|
@ -59,21 +59,21 @@ class Forwarded{
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constructor.
|
* A constructor.
|
||||||
* Empty constructor
|
* Empty constructor
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets the object's attributes.
|
* sets the object's attributes.
|
||||||
* @param $values should be an array of the form array('Group' => group_id, 'Ticket' => ticket_id).
|
* @param $values should be an array of the form array('Group' => group_id, 'Ticket' => ticket_id).
|
||||||
|
@ -82,8 +82,8 @@ class Forwarded{
|
||||||
$this->setGroup($values['Group']);
|
$this->setGroup($values['Group']);
|
||||||
$this->setTicket($values['Ticket']);
|
$this->setTicket($values['Ticket']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates a new 'forwarded' entry.
|
* creates a new 'forwarded' entry.
|
||||||
* this method will use the object's attributes for creating a new 'forwarded' entry in the database.
|
* this method will use the object's attributes for creating a new 'forwarded' entry in the database.
|
||||||
|
@ -92,15 +92,15 @@ class Forwarded{
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$dbl->insert("`forwarded`", Array('Group' => $this->getGroup(), 'Ticket' => $this->getTicket()));
|
$dbl->insert("`forwarded`", Array('Group' => $this->getGroup(), 'Ticket' => $this->getTicket()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* deletes an existing 'forwarded' entry.
|
* deletes an existing 'forwarded' entry.
|
||||||
* this method will use the object's attributes for deleting an existing 'forwarded' entry in the database.
|
* this method will use the object's attributes for deleting an existing 'forwarded' entry in the database.
|
||||||
*/
|
*/
|
||||||
public function delete() {
|
public function delete() {
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$dbl->delete("`forwarded`", array('group_id' => $this->getGroup() ,'ticket_id' => $this->getTicket(), "`Group` = :group_id and `Ticket` = :ticket_id");
|
$dbl->delete("`forwarded`", array('group_id' => $this->getGroup() ,'ticket_id' => $this->getTicket(), "`Group` = :group_id and `Ticket` = :ticket_id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -115,24 +115,24 @@ class Forwarded{
|
||||||
$row = $statement->fetch();
|
$row = $statement->fetch();
|
||||||
$this->set($row);
|
$this->set($row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////Getters////////////////////////////////////////////////////
|
////////////////////////////////////////////Getters////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get group attribute of the object.
|
* get group attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getGroup(){
|
public function getGroup(){
|
||||||
return $this->group;
|
return $this->group;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get ticket attribute of the object.
|
* get ticket attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getTicket(){
|
public function getTicket(){
|
||||||
return $this->ticket;
|
return $this->ticket;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -142,7 +142,7 @@ class Forwarded{
|
||||||
public function setGroup($g){
|
public function setGroup($g){
|
||||||
$this->group = $g;
|
$this->group = $g;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set ticket attribute of the object.
|
* set ticket attribute of the object.
|
||||||
* @param $t integer id of the ticket
|
* @param $t integer id of the ticket
|
||||||
|
@ -150,6 +150,6 @@ class Forwarded{
|
||||||
public function setTicket($t){
|
public function setTicket($t){
|
||||||
$this->ticket = $t;
|
$this->ticket = $t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,19 +6,19 @@
|
||||||
* @author Daan Janssens, mentored by Matthew Lagoe
|
* @author Daan Janssens, mentored by Matthew Lagoe
|
||||||
*/
|
*/
|
||||||
class Ticket{
|
class Ticket{
|
||||||
|
|
||||||
private $tId; /**< The id of ticket */
|
private $tId; /**< The id of ticket */
|
||||||
private $timestamp; /**< Timestamp of the ticket */
|
private $timestamp; /**< Timestamp of the ticket */
|
||||||
private $title; /**< Title of the ticket */
|
private $title; /**< Title of the ticket */
|
||||||
private $status; /**< Status of the ticket (0 = waiting on user reply, 1 = waiting on support, (2= not used atm), 3 = closed */
|
private $status; /**< Status of the ticket (0 = waiting on user reply, 1 = waiting on support, (2= not used atm), 3 = closed */
|
||||||
private $queue; /**< (not in use atm) */
|
private $queue; /**< (not in use atm) */
|
||||||
private $ticket_category; /**< the id of the category belonging to the ticket */
|
private $ticket_category; /**< the id of the category belonging to the ticket */
|
||||||
private $author; /**< The ticket_users id */
|
private $author; /**< The ticket_users id */
|
||||||
private $priority; /**< The priority of the ticket where 0 = low, 3= supadupahigh */
|
private $priority; /**< The priority of the ticket where 0 = low, 3= supadupahigh */
|
||||||
|
|
||||||
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check if a ticket exists.
|
* check if a ticket exists.
|
||||||
* @param $id the id of the ticket to be checked.
|
* @param $id the id of the ticket to be checked.
|
||||||
|
@ -31,10 +31,10 @@ class Ticket{
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return an array of the possible statuses
|
* return an array of the possible statuses
|
||||||
* @return an array containing the string values that represent the different statuses.
|
* @return an array containing the string values that represent the different statuses.
|
||||||
|
@ -51,8 +51,8 @@ class Ticket{
|
||||||
public static function getPriorityArray() {
|
public static function getPriorityArray() {
|
||||||
return Array("Low","Normal","High","Super Dupa High");
|
return Array("Low","Normal","High","Super Dupa High");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return an entire ticket.
|
* return an entire ticket.
|
||||||
* returns the ticket object and an array of all replies to that ticket.
|
* returns the ticket object and an array of all replies to that ticket.
|
||||||
|
@ -64,10 +64,10 @@ class Ticket{
|
||||||
$ticket = new Ticket();
|
$ticket = new Ticket();
|
||||||
$ticket->load_With_TId($id);
|
$ticket->load_With_TId($id);
|
||||||
$reply_array = Ticket_Reply::getRepliesOfTicket($id, $view_as_admin);
|
$reply_array = Ticket_Reply::getRepliesOfTicket($id, $view_as_admin);
|
||||||
return Array('ticket_obj' => $ticket,'reply_array' => $reply_array);
|
return Array('ticket_obj' => $ticket,'reply_array' => $reply_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return all tickets of a specific user.
|
* return all tickets of a specific user.
|
||||||
* an array of all tickets created by a specific user are returned by this function.
|
* an array of all tickets created by a specific user are returned by this function.
|
||||||
|
@ -90,11 +90,11 @@ class Ticket{
|
||||||
$instance->setAuthor($ticket['Author']);
|
$instance->setAuthor($ticket['Author']);
|
||||||
$result[] = $instance;
|
$result[] = $instance;
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function that creates a new ticket.
|
* function that creates a new ticket.
|
||||||
* A new ticket will be created, in case the extra_info != 0 and the http request came from ingame, then a ticket_info page will be created.
|
* A new ticket will be created, in case the extra_info != 0 and the http request came from ingame, then a ticket_info page will be created.
|
||||||
|
@ -117,13 +117,13 @@ class Ticket{
|
||||||
$ticket->set($values);
|
$ticket->set($values);
|
||||||
$ticket->create();
|
$ticket->create();
|
||||||
$ticket_id = $ticket->getTId();
|
$ticket_id = $ticket->getTId();
|
||||||
|
|
||||||
//if ingame then add an extra info
|
//if ingame then add an extra info
|
||||||
if(Helpers::check_if_game_client() && $extra_info != 0){
|
if(Helpers::check_if_game_client() && $extra_info != 0){
|
||||||
$extra_info['Ticket'] = $ticket_id;
|
$extra_info['Ticket'] = $ticket_id;
|
||||||
Ticket_Info::create_Ticket_Info($extra_info);
|
Ticket_Info::create_Ticket_Info($extra_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
//write a log entry
|
//write a log entry
|
||||||
if ( $author == $real_author){
|
if ( $author == $real_author){
|
||||||
Ticket_Log::createLogEntry( $ticket_id, $author, 1);
|
Ticket_Log::createLogEntry( $ticket_id, $author, 1);
|
||||||
|
@ -131,18 +131,18 @@ class Ticket{
|
||||||
Ticket_Log::createLogEntry( $ticket_id, $real_author, 2, $author);
|
Ticket_Log::createLogEntry( $ticket_id, $real_author, 2, $author);
|
||||||
}
|
}
|
||||||
Ticket_Reply::createReply($content, $author, $ticket_id, 0, $author);
|
Ticket_Reply::createReply($content, $author, $ticket_id, 0, $author);
|
||||||
|
|
||||||
//forwards the ticket directly after creation to the supposed support group
|
//forwards the ticket directly after creation to the supposed support group
|
||||||
if($for_support_group){
|
if($for_support_group){
|
||||||
Ticket::forwardTicket(0, $ticket_id, $for_support_group);
|
Ticket::forwardTicket(0, $ticket_id, $for_support_group);
|
||||||
}
|
}
|
||||||
|
|
||||||
//send email that new ticket has been created
|
//send email that new ticket has been created
|
||||||
Mail_Handler::send_ticketing_mail($ticket->getAuthor(), $ticket, $content, "NEW", $ticket->getForwardedGroupId());
|
Mail_Handler::send_ticketing_mail($ticket->getAuthor(), $ticket, $content, "NEW", $ticket->getForwardedGroupId());
|
||||||
return $ticket_id;
|
return $ticket_id;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* updates the ticket's status.
|
* updates the ticket's status.
|
||||||
|
@ -152,7 +152,7 @@ class Ticket{
|
||||||
* @param $author the user (id) that performed the update status action
|
* @param $author the user (id) that performed the update status action
|
||||||
*/
|
*/
|
||||||
public static function updateTicketStatus( $ticket_id, $newStatus, $author) {
|
public static function updateTicketStatus( $ticket_id, $newStatus, $author) {
|
||||||
|
|
||||||
$ticket = new Ticket();
|
$ticket = new Ticket();
|
||||||
$ticket->load_With_TId($ticket_id);
|
$ticket->load_With_TId($ticket_id);
|
||||||
if ($ticket->getStatus() != $newStatus){
|
if ($ticket->getStatus() != $newStatus){
|
||||||
|
@ -160,10 +160,10 @@ class Ticket{
|
||||||
Ticket_Log::createLogEntry( $ticket_id, $author, 5, $newStatus);
|
Ticket_Log::createLogEntry( $ticket_id, $author, 5, $newStatus);
|
||||||
}
|
}
|
||||||
$ticket->update();
|
$ticket->update();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* updates the ticket's status & priority.
|
* updates the ticket's status & priority.
|
||||||
* A log entry about this will be created only if the newStatus is different from the current status and also when the newPriority is different from the current priority.
|
* A log entry about this will be created only if the newStatus is different from the current status and also when the newPriority is different from the current priority.
|
||||||
|
@ -174,7 +174,7 @@ class Ticket{
|
||||||
* @param $author the user (id) that performed the update
|
* @param $author the user (id) that performed the update
|
||||||
*/
|
*/
|
||||||
public static function updateTicketStatusAndPriority( $ticket_id, $newStatus, $newPriority, $author) {
|
public static function updateTicketStatusAndPriority( $ticket_id, $newStatus, $newPriority, $author) {
|
||||||
|
|
||||||
$ticket = new Ticket();
|
$ticket = new Ticket();
|
||||||
$ticket->load_With_TId($ticket_id);
|
$ticket->load_With_TId($ticket_id);
|
||||||
if ($ticket->getStatus() != $newStatus){
|
if ($ticket->getStatus() != $newStatus){
|
||||||
|
@ -186,10 +186,10 @@ class Ticket{
|
||||||
Ticket_Log::createLogEntry( $ticket_id, $author, 6, $newPriority);
|
Ticket_Log::createLogEntry( $ticket_id, $author, 6, $newPriority);
|
||||||
}
|
}
|
||||||
$ticket->update();
|
$ticket->update();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return the latest reply of a ticket
|
* return the latest reply of a ticket
|
||||||
* @param $ticket_id the id of the ticket.
|
* @param $ticket_id the id of the ticket.
|
||||||
|
@ -202,8 +202,8 @@ class Ticket{
|
||||||
$reply->set($statement->fetch());
|
$reply->set($statement->fetch());
|
||||||
return $reply;
|
return $reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create a new reply for a ticket.
|
* create a new reply for a ticket.
|
||||||
* A reply will only be added if the content isn't empty and if the ticket isn't closed.
|
* A reply will only be added if the content isn't empty and if the ticket isn't closed.
|
||||||
|
@ -222,13 +222,13 @@ class Ticket{
|
||||||
//if status is not closed
|
//if status is not closed
|
||||||
if($ticket->getStatus() != 3){
|
if($ticket->getStatus() != 3){
|
||||||
Ticket_Reply::createReply($content, $author, $ticket_id, $hidden, $ticket->getAuthor());
|
Ticket_Reply::createReply($content, $author, $ticket_id, $hidden, $ticket->getAuthor());
|
||||||
|
|
||||||
//notify ticket author that a new reply is added!
|
//notify ticket author that a new reply is added!
|
||||||
if($ticket->getAuthor() != $author){
|
if($ticket->getAuthor() != $author){
|
||||||
Mail_Handler::send_ticketing_mail($ticket->getAuthor(), $ticket, $content, "REPLY", $ticket->getForwardedGroupId());
|
Mail_Handler::send_ticketing_mail($ticket->getAuthor(), $ticket, $content, "REPLY", $ticket->getForwardedGroupId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
//TODO: Show error message that ticket is closed
|
//TODO: Show error message that ticket is closed
|
||||||
}
|
}
|
||||||
|
@ -236,8 +236,8 @@ class Ticket{
|
||||||
//TODO: Show error content is empty
|
//TODO: Show error content is empty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* assign a ticket to a user.
|
* assign a ticket to a user.
|
||||||
* Checks if the ticket exists, if so then it will try to assign the user to it, a log entry will be written about this.
|
* Checks if the ticket exists, if so then it will try to assign the user to it, a log entry will be written about this.
|
||||||
|
@ -254,8 +254,8 @@ class Ticket{
|
||||||
return "TICKET_NOT_EXISTING";
|
return "TICKET_NOT_EXISTING";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* unassign a ticket of a user.
|
* unassign a ticket of a user.
|
||||||
* Checks if the ticket exists, if so then it will try to unassign the user of it, a log entry will be written about this.
|
* Checks if the ticket exists, if so then it will try to unassign the user of it, a log entry will be written about this.
|
||||||
|
@ -272,8 +272,8 @@ class Ticket{
|
||||||
return "TICKET_NOT_EXISTING";
|
return "TICKET_NOT_EXISTING";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* forward a ticket to a specific support group.
|
* forward a ticket to a specific support group.
|
||||||
* Checks if the ticket exists, if so then it will try to forward the ticket to the support group specified, a log entry will be written about this.
|
* Checks if the ticket exists, if so then it will try to forward the ticket to the support group specified, a log entry will be written about this.
|
||||||
|
@ -288,7 +288,7 @@ class Ticket{
|
||||||
if(isset($group_id) && $group_id != ""){
|
if(isset($group_id) && $group_id != ""){
|
||||||
//forward the ticket
|
//forward the ticket
|
||||||
$returnvalue = Forwarded::forwardTicket($group_id, $ticket_id);
|
$returnvalue = Forwarded::forwardTicket($group_id, $ticket_id);
|
||||||
|
|
||||||
if($user_id != 0){
|
if($user_id != 0){
|
||||||
//unassign the ticket incase the ticket is assined to yourself
|
//unassign the ticket incase the ticket is assined to yourself
|
||||||
self::unAssignTicket($user_id, $ticket_id);
|
self::unAssignTicket($user_id, $ticket_id);
|
||||||
|
@ -303,12 +303,12 @@ class Ticket{
|
||||||
return "TICKET_NOT_EXISTING";
|
return "TICKET_NOT_EXISTING";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constructor.
|
* A constructor.
|
||||||
* Empty constructor
|
* Empty constructor
|
||||||
|
@ -335,18 +335,18 @@ class Ticket{
|
||||||
$this->author = $values['Author'];
|
$this->author = $values['Author'];
|
||||||
$this->priority = $values['Priority'];
|
$this->priority = $values['Priority'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates a new 'ticket' entry.
|
* creates a new 'ticket' entry.
|
||||||
* this method will use the object's attributes for creating a new 'ticket' entry in the database.
|
* this method will use the object's attributes for creating a new 'ticket' entry in the database.
|
||||||
*/
|
*/
|
||||||
public function create(){
|
public function create(){
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$this->tId = $dbl->executeReturnId("ticket", Array('Timestamp'=>now(), 'Title' => $this->title, 'Status' => $this->status, 'Queue' => $this->queue, 'Ticket_Category' => $this->ticket_category, 'Author' => $this->author, 'Priority' => $this->priority));
|
$this->tId = $dbl->executeReturnId("ticket", Array('Title' => $this->title, 'Status' => $this->status, 'Queue' => $this->queue, 'Ticket_Category' => $this->ticket_category, 'Author' => $this->author, 'Priority' => $this->priority), array('Timestamp'=>'now()'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loads the object's attributes.
|
* loads the object's attributes.
|
||||||
* loads the object's attributes by giving a TId (ticket id).
|
* loads the object's attributes by giving a TId (ticket id).
|
||||||
|
@ -365,8 +365,8 @@ class Ticket{
|
||||||
$this->author = $row['Author'];
|
$this->author = $row['Author'];
|
||||||
$this->priority = $row['Priority'];
|
$this->priority = $row['Priority'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* update the objects attributes to the db.
|
* update the objects attributes to the db.
|
||||||
*/
|
*/
|
||||||
|
@ -374,8 +374,8 @@ class Ticket{
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$dbl->update("ticket", Array('Timestamp' => $this->timestamp, 'Title' => $this->title, 'Status' => $this->status, 'Queue' => $this->queue, 'Ticket_Category' => $this->ticket_category, 'Author' => $this->author, 'Priority' => $this->priority), "TId=$this->tId");
|
$dbl->update("ticket", Array('Timestamp' => $this->timestamp, 'Title' => $this->title, 'Status' => $this->status, 'Queue' => $this->queue, 'Ticket_Category' => $this->ticket_category, 'Author' => $this->author, 'Priority' => $this->priority), "TId=$this->tId");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check if a ticket has a ticket_info page or not.
|
* check if a ticket has a ticket_info page or not.
|
||||||
* @return true or false
|
* @return true or false
|
||||||
|
@ -383,38 +383,38 @@ class Ticket{
|
||||||
public function hasInfo(){
|
public function hasInfo(){
|
||||||
return Ticket_Info::TicketHasInfo($this->getTId());
|
return Ticket_Info::TicketHasInfo($this->getTId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////Getters////////////////////////////////////////////////////
|
////////////////////////////////////////////Getters////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get tId attribute of the object.
|
* get tId attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getTId(){
|
public function getTId(){
|
||||||
return $this->tId;
|
return $this->tId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get timestamp attribute of the object in the format defined in the outputTime function of the Helperclass.
|
* get timestamp attribute of the object in the format defined in the outputTime function of the Helperclass.
|
||||||
*/
|
*/
|
||||||
public function getTimestamp(){
|
public function getTimestamp(){
|
||||||
return Helpers::outputTime($this->timestamp);
|
return Helpers::outputTime($this->timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get title attribute of the object.
|
* get title attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getTitle(){
|
public function getTitle(){
|
||||||
return $this->title;
|
return $this->title;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get status attribute of the object.
|
* get status attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getStatus(){
|
public function getStatus(){
|
||||||
return $this->status;
|
return $this->status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get status attribute of the object in the form of text (string).
|
* get status attribute of the object in the form of text (string).
|
||||||
*/
|
*/
|
||||||
|
@ -422,43 +422,43 @@ class Ticket{
|
||||||
$statusArray = Ticket::getStatusArray();
|
$statusArray = Ticket::getStatusArray();
|
||||||
return $statusArray[$this->getStatus()];
|
return $statusArray[$this->getStatus()];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get category attribute of the object in the form of text (string).
|
* get category attribute of the object in the form of text (string).
|
||||||
*/
|
*/
|
||||||
public function getCategoryName(){
|
public function getCategoryName(){
|
||||||
$category = Ticket_Category::constr_TCategoryId($this->getTicket_Category());
|
$category = Ticket_Category::constr_TCategoryId($this->getTicket_Category());
|
||||||
return $category->getName();
|
return $category->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get queue attribute of the object.
|
* get queue attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getQueue(){
|
public function getQueue(){
|
||||||
return $this->queue;
|
return $this->queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get ticket_category attribute of the object (int).
|
* get ticket_category attribute of the object (int).
|
||||||
*/
|
*/
|
||||||
public function getTicket_Category(){
|
public function getTicket_Category(){
|
||||||
return $this->ticket_category;
|
return $this->ticket_category;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get author attribute of the object (int).
|
* get author attribute of the object (int).
|
||||||
*/
|
*/
|
||||||
public function getAuthor(){
|
public function getAuthor(){
|
||||||
return $this->author;
|
return $this->author;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get priority attribute of the object (int).
|
* get priority attribute of the object (int).
|
||||||
*/
|
*/
|
||||||
public function getPriority(){
|
public function getPriority(){
|
||||||
return $this->priority;
|
return $this->priority;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get priority attribute of the object in the form of text (string).
|
* get priority attribute of the object in the form of text (string).
|
||||||
*/
|
*/
|
||||||
|
@ -466,7 +466,7 @@ class Ticket{
|
||||||
$priorityArray = Ticket::getPriorityArray();
|
$priorityArray = Ticket::getPriorityArray();
|
||||||
return $priorityArray[$this->getPriority()];
|
return $priorityArray[$this->getPriority()];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the user assigned to the ticket.
|
* get the user assigned to the ticket.
|
||||||
* or return 0 in case not assigned.
|
* or return 0 in case not assigned.
|
||||||
|
@ -479,7 +479,7 @@ class Ticket{
|
||||||
return $user_id;
|
return $user_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the name of the support group to whom the ticket is forwarded
|
* get the name of the support group to whom the ticket is forwarded
|
||||||
* or return 0 in case not forwarded.
|
* or return 0 in case not forwarded.
|
||||||
|
@ -492,7 +492,7 @@ class Ticket{
|
||||||
return Support_Group::getGroup($group_id)->getName();
|
return Support_Group::getGroup($group_id)->getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the id of the support group to whom the ticket is forwarded
|
* get the id of the support group to whom the ticket is forwarded
|
||||||
* or return 0 in case not forwarded.
|
* or return 0 in case not forwarded.
|
||||||
|
@ -506,7 +506,7 @@ class Ticket{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set tId attribute of the object.
|
* set tId attribute of the object.
|
||||||
* @param $id integer id of the ticket
|
* @param $id integer id of the ticket
|
||||||
|
@ -514,7 +514,7 @@ class Ticket{
|
||||||
public function setTId($id){
|
public function setTId($id){
|
||||||
$this->tId = $id;
|
$this->tId = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set timestamp attribute of the object.
|
* set timestamp attribute of the object.
|
||||||
* @param $ts timestamp of the ticket
|
* @param $ts timestamp of the ticket
|
||||||
|
@ -522,7 +522,7 @@ class Ticket{
|
||||||
public function setTimestamp($ts){
|
public function setTimestamp($ts){
|
||||||
$this->timestamp = $ts;
|
$this->timestamp = $ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set title attribute of the object.
|
* set title attribute of the object.
|
||||||
* @param $t title of the ticket
|
* @param $t title of the ticket
|
||||||
|
@ -530,7 +530,7 @@ class Ticket{
|
||||||
public function setTitle($t){
|
public function setTitle($t){
|
||||||
$this->title = $t;
|
$this->title = $t;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set status attribute of the object.
|
* set status attribute of the object.
|
||||||
* @param $s status of the ticket(int)
|
* @param $s status of the ticket(int)
|
||||||
|
@ -538,7 +538,7 @@ class Ticket{
|
||||||
public function setStatus($s){
|
public function setStatus($s){
|
||||||
$this->status = $s;
|
$this->status = $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set queue attribute of the object.
|
* set queue attribute of the object.
|
||||||
* @param $q queue of the ticket
|
* @param $q queue of the ticket
|
||||||
|
@ -546,7 +546,7 @@ class Ticket{
|
||||||
public function setQueue($q){
|
public function setQueue($q){
|
||||||
$this->queue = $q;
|
$this->queue = $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set ticket_category attribute of the object.
|
* set ticket_category attribute of the object.
|
||||||
* @param $tc ticket_category id of the ticket(int)
|
* @param $tc ticket_category id of the ticket(int)
|
||||||
|
@ -554,7 +554,7 @@ class Ticket{
|
||||||
public function setTicket_Category($tc){
|
public function setTicket_Category($tc){
|
||||||
$this->ticket_category = $tc;
|
$this->ticket_category = $tc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set author attribute of the object.
|
* set author attribute of the object.
|
||||||
* @param $a author of the ticket
|
* @param $a author of the ticket
|
||||||
|
@ -562,7 +562,7 @@ class Ticket{
|
||||||
public function setAuthor($a){
|
public function setAuthor($a){
|
||||||
$this->author = $a;
|
$this->author = $a;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set priority attribute of the object.
|
* set priority attribute of the object.
|
||||||
* @param $p priority of the ticket
|
* @param $p priority of the ticket
|
||||||
|
@ -570,5 +570,5 @@ class Ticket{
|
||||||
public function setPriority($p){
|
public function setPriority($p){
|
||||||
$this->priority = $p;
|
$this->priority = $p;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Class that handles the logging. The logging will be used when a ticket is created, a reply is added, if someone views a ticket,
|
* Class that handles the logging. The logging will be used when a ticket is created, a reply is added, if someone views a ticket,
|
||||||
* if someone assigns a ticket to him or if someone forwards a ticket. This class provides functions to get retrieve those logs and also make them.
|
* if someone assigns a ticket to him or if someone forwards a ticket. This class provides functions to get retrieve those logs and also make them.
|
||||||
*
|
*
|
||||||
*-the Action IDs being used are:
|
*-the Action IDs being used are:
|
||||||
* -# User X Created ticket
|
* -# User X Created ticket
|
||||||
* -# Admin X created ticket for arg
|
* -# Admin X created ticket for arg
|
||||||
|
@ -18,13 +18,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Ticket_Log{
|
class Ticket_Log{
|
||||||
|
|
||||||
private $tLogId; /**< The id of the log entry */
|
private $tLogId; /**< The id of the log entry */
|
||||||
private $timestamp; /**< The timestamp of the log entry */
|
private $timestamp; /**< The timestamp of the log entry */
|
||||||
private $query; /**< The query (json encoded array containing action id & argument) */
|
private $query; /**< The query (json encoded array containing action id & argument) */
|
||||||
private $author; /**< author of the log */
|
private $author; /**< author of the log */
|
||||||
private $ticket; /**< the id of the ticket related to the log entry */
|
private $ticket; /**< the id of the ticket related to the log entry */
|
||||||
|
|
||||||
/****************************************
|
/****************************************
|
||||||
*Action ID's:
|
*Action ID's:
|
||||||
* 1: User X Created Ticket
|
* 1: User X Created Ticket
|
||||||
|
@ -38,10 +38,10 @@ class Ticket_Log{
|
||||||
* 9: unassigned to the ticket
|
* 9: unassigned to the ticket
|
||||||
*
|
*
|
||||||
****************************************/
|
****************************************/
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return all log entries related to a ticket.
|
* return all log entries related to a ticket.
|
||||||
* @param $ticket_id the id of the ticket of which we want all related log entries returned.
|
* @param $ticket_id the id of the ticket of which we want all related log entries returned.
|
||||||
|
@ -65,10 +65,10 @@ class Ticket_Log{
|
||||||
$instanceLog->setQuery($log['Query']);
|
$instanceLog->setQuery($log['Query']);
|
||||||
$result[] = $instanceLog;
|
$result[] = $instanceLog;
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create a new log entry.
|
* create a new log entry.
|
||||||
* It will check if the $TICKET_LOGGING global var is true, this var is used to turn logging on and off. In case it's on, the log message will be stored.
|
* It will check if the $TICKET_LOGGING global var is true, this var is used to turn logging on and off. In case it's on, the log message will be stored.
|
||||||
|
@ -82,8 +82,8 @@ class Ticket_Log{
|
||||||
global $TICKET_LOGGING;
|
global $TICKET_LOGGING;
|
||||||
if($TICKET_LOGGING){
|
if($TICKET_LOGGING){
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$values = Array('Timestamp'=>now(), 'Query' => json_encode(array($action,$arg)), 'Ticket' => $ticket_id, 'Author' => $author_id);
|
$values = Array('Query' => json_encode(array($action,$arg)), 'Ticket' => $ticket_id, 'Author' => $author_id);
|
||||||
$dbl->insert("ticket_log", $values);
|
$dbl->insert("ticket_log", $values, array('Timestamp'=>'now()'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ class Ticket_Log{
|
||||||
$instance->setTLogId($id);
|
$instance->setTLogId($id);
|
||||||
return $instance;
|
return $instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return all log entries related to a ticket.
|
* return all log entries related to a ticket.
|
||||||
* @param $ticket_id the id of the ticket of which we want all related log entries returned.
|
* @param $ticket_id the id of the ticket of which we want all related log entries returned.
|
||||||
|
@ -115,19 +115,19 @@ class Ticket_Log{
|
||||||
$instance->set($log);
|
$instance->set($log);
|
||||||
$result[] = $instance;
|
$result[] = $instance;
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constructor.
|
* A constructor.
|
||||||
* Empty constructor
|
* Empty constructor
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets the object's attributes.
|
* sets the object's attributes.
|
||||||
* @param $values should be an array.
|
* @param $values should be an array.
|
||||||
|
@ -138,7 +138,7 @@ class Ticket_Log{
|
||||||
$this->setQuery($values['Query']);
|
$this->setQuery($values['Query']);
|
||||||
$this->setTicket($values['Ticket']);
|
$this->setTicket($values['Ticket']);
|
||||||
$this->setAuthor($values['Author']);
|
$this->setAuthor($values['Author']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loads the object's attributes.
|
* loads the object's attributes.
|
||||||
|
@ -151,56 +151,56 @@ class Ticket_Log{
|
||||||
$row = $statement->fetch();
|
$row = $statement->fetch();
|
||||||
$this->set($row);
|
$this->set($row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* update attributes of the object to the DB.
|
* update attributes of the object to the DB.
|
||||||
*/
|
*/
|
||||||
public function update(){
|
public function update(){
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
|
|
||||||
$values = Array('timestamp' => $this->getTimestamp(), 'query' => $this->getQuery(), 'author' => $this->getAuthor(), 'ticket' => $this->getTicket() );
|
$values = Array('timestamp' => $this->getTimestamp(), 'query' => $this->getQuery(), 'author' => $this->getAuthor(), 'ticket' => $this->getTicket() );
|
||||||
$dbl->update("ticket_log", $values, "TLogId = $this->getTLogId()");
|
$dbl->update("ticket_log", $values, "TLogId = $this->getTLogId()");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////Getters////////////////////////////////////////////////////
|
////////////////////////////////////////////Getters////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get tLogId attribute of the object.
|
* get tLogId attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getTLogId(){
|
public function getTLogId(){
|
||||||
return $this->tLogId;
|
return $this->tLogId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get timestamp attribute of the object.
|
* get timestamp attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getTimestamp(){
|
public function getTimestamp(){
|
||||||
return Helpers::outputTime($this->timestamp);
|
return Helpers::outputTime($this->timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get query attribute of the object.
|
* get query attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getQuery(){
|
public function getQuery(){
|
||||||
return $this->query;
|
return $this->query;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get author attribute of the object.
|
* get author attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getAuthor(){
|
public function getAuthor(){
|
||||||
return $this->author;
|
return $this->author;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get ticket attribute of the object.
|
* get ticket attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getTicket(){
|
public function getTicket(){
|
||||||
return $this->ticket;
|
return $this->ticket;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the action id out of the query by decoding it.
|
* get the action id out of the query by decoding it.
|
||||||
*/
|
*/
|
||||||
|
@ -208,7 +208,7 @@ class Ticket_Log{
|
||||||
$decodedQuery = json_decode($this->query);
|
$decodedQuery = json_decode($this->query);
|
||||||
return $decodedQuery[0];
|
return $decodedQuery[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the argument out of the query by decoding it.
|
* get the argument out of the query by decoding it.
|
||||||
*/
|
*/
|
||||||
|
@ -216,7 +216,7 @@ class Ticket_Log{
|
||||||
$decodedQuery = json_decode($this->query);
|
$decodedQuery = json_decode($this->query);
|
||||||
return $decodedQuery[1];
|
return $decodedQuery[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the action text(string) array.
|
* get the action text(string) array.
|
||||||
* this is being read from the language .ini files.
|
* this is being read from the language .ini files.
|
||||||
|
@ -229,9 +229,9 @@ class Ticket_Log{
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set tLogId attribute of the object.
|
* set tLogId attribute of the object.
|
||||||
* @param $id integer id of the log entry
|
* @param $id integer id of the log entry
|
||||||
|
@ -239,7 +239,7 @@ class Ticket_Log{
|
||||||
public function setTLogId($id){
|
public function setTLogId($id){
|
||||||
$this->tLogId = $id;
|
$this->tLogId = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set timestamp attribute of the object.
|
* set timestamp attribute of the object.
|
||||||
* @param $t timestamp of the log entry
|
* @param $t timestamp of the log entry
|
||||||
|
@ -247,7 +247,7 @@ class Ticket_Log{
|
||||||
public function setTimestamp($t){
|
public function setTimestamp($t){
|
||||||
$this->timestamp = $t;
|
$this->timestamp = $t;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set query attribute of the object.
|
* set query attribute of the object.
|
||||||
* @param $q the encoded query
|
* @param $q the encoded query
|
||||||
|
@ -255,7 +255,7 @@ class Ticket_Log{
|
||||||
public function setQuery($q){
|
public function setQuery($q){
|
||||||
$this->query = $q;
|
$this->query = $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set author attribute of the object.
|
* set author attribute of the object.
|
||||||
* @param $a integer id of the user who created the log entry
|
* @param $a integer id of the user who created the log entry
|
||||||
|
@ -263,7 +263,7 @@ class Ticket_Log{
|
||||||
public function setAuthor($a){
|
public function setAuthor($a){
|
||||||
$this->author = $a;
|
$this->author = $a;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set ticket attribute of the object.
|
* set ticket attribute of the object.
|
||||||
* @param $t integer id of ticket of which the log entry is related to.
|
* @param $t integer id of ticket of which the log entry is related to.
|
||||||
|
@ -271,6 +271,6 @@ class Ticket_Log{
|
||||||
public function setTicket($t){
|
public function setTicket($t){
|
||||||
$this->ticket = $t;
|
$this->ticket = $t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
* @author Daan Janssens, mentored by Matthew Lagoe
|
* @author Daan Janssens, mentored by Matthew Lagoe
|
||||||
*/
|
*/
|
||||||
class Ticket_Reply{
|
class Ticket_Reply{
|
||||||
private $tReplyId; /**< The id of the reply */
|
private $tReplyId; /**< The id of the reply */
|
||||||
private $ticket; /**< the ticket id related to the reply */
|
private $ticket; /**< the ticket id related to the reply */
|
||||||
private $content; /**< the content of the reply */
|
private $content; /**< the content of the reply */
|
||||||
private $author; /**< The id of the user that made the reply */
|
private $author; /**< The id of the user that made the reply */
|
||||||
private $timestamp; /**< The timestamp of the reply */
|
private $timestamp; /**< The timestamp of the reply */
|
||||||
private $hidden; /**< indicates if reply should be hidden for normal users or not */
|
private $hidden; /**< indicates if reply should be hidden for normal users or not */
|
||||||
|
|
||||||
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return constructed element based on TReplyId.
|
* return constructed element based on TReplyId.
|
||||||
* @param $id the Id the reply we want to load.
|
* @param $id the Id the reply we want to load.
|
||||||
|
@ -23,8 +23,8 @@ class Ticket_Reply{
|
||||||
$instance->setTReplyId($id);
|
$instance->setTReplyId($id);
|
||||||
return $instance;
|
return $instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return all replies on a specific ticket.
|
* return all replies on a specific ticket.
|
||||||
* @param $ticket_id the id of the ticket of which we want the replies.
|
* @param $ticket_id the id of the ticket of which we want the replies.
|
||||||
|
@ -43,12 +43,12 @@ class Ticket_Reply{
|
||||||
$instanceAuthor = Ticket_User::constr_TUserId($tReply['Author']);
|
$instanceAuthor = Ticket_User::constr_TUserId($tReply['Author']);
|
||||||
$instanceAuthor->setExternId($tReply['ExternId']);
|
$instanceAuthor->setExternId($tReply['ExternId']);
|
||||||
$instanceAuthor->setPermission($tReply['Permission']);
|
$instanceAuthor->setPermission($tReply['Permission']);
|
||||||
|
|
||||||
//load content
|
//load content
|
||||||
$instanceContent = new Ticket_Content();
|
$instanceContent = new Ticket_Content();
|
||||||
$instanceContent->setTContentId($tReply['TContentId']);
|
$instanceContent->setTContentId($tReply['TContentId']);
|
||||||
$instanceContent->setContent($tReply['Content']);
|
$instanceContent->setContent($tReply['Content']);
|
||||||
|
|
||||||
//load reply and add the author and content object in it.
|
//load reply and add the author and content object in it.
|
||||||
$instanceReply = new self();
|
$instanceReply = new self();
|
||||||
$instanceReply->setTReplyId($tReply['TReplyId']);
|
$instanceReply->setTReplyId($tReply['TReplyId']);
|
||||||
|
@ -60,9 +60,9 @@ class Ticket_Reply{
|
||||||
$result[] = $instanceReply;
|
$result[] = $instanceReply;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates a new reply on a ticket.
|
* creates a new reply on a ticket.
|
||||||
* Creates a ticket_content entry and links it with a new created ticket_reply, a log entry will be written about this.
|
* Creates a ticket_content entry and links it with a new created ticket_reply, a log entry will be written about this.
|
||||||
|
@ -78,19 +78,19 @@ class Ticket_Reply{
|
||||||
$ticket_content->setContent($content);
|
$ticket_content->setContent($content);
|
||||||
$ticket_content->create();
|
$ticket_content->create();
|
||||||
$content_id = $ticket_content->getTContentId();
|
$content_id = $ticket_content->getTContentId();
|
||||||
|
|
||||||
$ticket_reply = new Ticket_Reply();
|
$ticket_reply = new Ticket_Reply();
|
||||||
$ticket_reply->set(Array('Ticket' => $ticket_id,'Content' => $content_id,'Author' => $author, 'Hidden' => $hidden));
|
$ticket_reply->set(Array('Ticket' => $ticket_id,'Content' => $content_id,'Author' => $author, 'Hidden' => $hidden));
|
||||||
$ticket_reply->create();
|
$ticket_reply->create();
|
||||||
$reply_id = $ticket_reply->getTReplyId();
|
$reply_id = $ticket_reply->getTReplyId();
|
||||||
|
|
||||||
if($ticket_creator == $author){
|
if($ticket_creator == $author){
|
||||||
Ticket::updateTicketStatus( $ticket_id, 1, $author);
|
Ticket::updateTicketStatus( $ticket_id, 1, $author);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ticket_Log::createLogEntry( $ticket_id, $author, 4, $reply_id);
|
Ticket_Log::createLogEntry( $ticket_id, $author, 4, $reply_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,14 +116,14 @@ class Ticket_Reply{
|
||||||
$this->setHidden($values['Hidden']);
|
$this->setHidden($values['Hidden']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates a new 'ticket_reply' entry.
|
* creates a new 'ticket_reply' entry.
|
||||||
* this method will use the object's attributes for creating a new 'ticket_reply' entry in the database (the now() function will create the timestamp).
|
* this method will use the object's attributes for creating a new 'ticket_reply' entry in the database (the now() function will create the timestamp).
|
||||||
*/
|
*/
|
||||||
public function create(){
|
public function create(){
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$this->tReplyId = $dbl->executeReturnId("ticket_reply", Array('Ticket' => $this->ticket, 'Content' => $this->content, 'Author' => $this->author,'Timestamp'=>now(), 'Hidden' => $this->hidden));
|
$this->tReplyId = $dbl->executeReturnId("ticket_reply", Array('Ticket' => $this->ticket, 'Content' => $this->content, 'Author' => $this->author, 'Hidden' => $this->hidden), array('Timestamp'=>'now()'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -142,7 +142,7 @@ class Ticket_Reply{
|
||||||
$this->timestamp = $row['Timestamp'];
|
$this->timestamp = $row['Timestamp'];
|
||||||
$this->hidden = $row['Hidden'];
|
$this->hidden = $row['Hidden'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* updates a ticket_reply entry based on the objects attributes.
|
* updates a ticket_reply entry based on the objects attributes.
|
||||||
*/
|
*/
|
||||||
|
@ -150,16 +150,16 @@ class Ticket_Reply{
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$dbl->update("ticket", Array('Ticket' => $this->ticket, 'Content' => $this->content, 'Author' => $this->author, 'Timestamp' => $this->timestamp, 'Hidden' => $this->hidden), "TReplyId=$this->tReplyId, ");
|
$dbl->update("ticket", Array('Ticket' => $this->ticket, 'Content' => $this->content, 'Author' => $this->author, 'Timestamp' => $this->timestamp, 'Hidden' => $this->hidden), "TReplyId=$this->tReplyId, ");
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////Getters////////////////////////////////////////////////////
|
////////////////////////////////////////////Getters////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get ticket attribute of the object.
|
* get ticket attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getTicket(){
|
public function getTicket(){
|
||||||
return $this->ticket;
|
return $this->ticket;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get content attribute of the object.
|
* get content attribute of the object.
|
||||||
*/
|
*/
|
||||||
|
@ -173,7 +173,7 @@ class Ticket_Reply{
|
||||||
public function getAuthor(){
|
public function getAuthor(){
|
||||||
return $this->author;
|
return $this->author;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get timestamp attribute of the object.
|
* get timestamp attribute of the object.
|
||||||
* The output format is defined by the Helpers class function, outputTime().
|
* The output format is defined by the Helpers class function, outputTime().
|
||||||
|
@ -181,23 +181,23 @@ class Ticket_Reply{
|
||||||
public function getTimestamp(){
|
public function getTimestamp(){
|
||||||
return Helpers::outputTime($this->timestamp);
|
return Helpers::outputTime($this->timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get tReplyId attribute of the object.
|
* get tReplyId attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getTReplyId(){
|
public function getTReplyId(){
|
||||||
return $this->tReplyId;
|
return $this->tReplyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get hidden attribute of the object.
|
* get hidden attribute of the object.
|
||||||
*/
|
*/
|
||||||
public function getHidden(){
|
public function getHidden(){
|
||||||
return $this->hidden;
|
return $this->hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set ticket attribute of the object.
|
* set ticket attribute of the object.
|
||||||
* @param $t integer id of the ticket
|
* @param $t integer id of the ticket
|
||||||
|
@ -205,7 +205,7 @@ class Ticket_Reply{
|
||||||
public function setTicket($t){
|
public function setTicket($t){
|
||||||
$this->ticket = $t;
|
$this->ticket = $t;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set content attribute of the object.
|
* set content attribute of the object.
|
||||||
* @param $c integer id of the ticket_content entry
|
* @param $c integer id of the ticket_content entry
|
||||||
|
@ -213,7 +213,7 @@ class Ticket_Reply{
|
||||||
public function setContent($c){
|
public function setContent($c){
|
||||||
$this->content = $c;
|
$this->content = $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set author attribute of the object.
|
* set author attribute of the object.
|
||||||
* @param $a integer id of the user
|
* @param $a integer id of the user
|
||||||
|
@ -221,7 +221,7 @@ class Ticket_Reply{
|
||||||
public function setAuthor($a){
|
public function setAuthor($a){
|
||||||
$this->author = $a;
|
$this->author = $a;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set timestamp attribute of the object.
|
* set timestamp attribute of the object.
|
||||||
* @param $t timestamp of the reply
|
* @param $t timestamp of the reply
|
||||||
|
@ -229,7 +229,7 @@ class Ticket_Reply{
|
||||||
public function setTimestamp($t){
|
public function setTimestamp($t){
|
||||||
$this->timestamp = $t;
|
$this->timestamp = $t;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set tReplyId attribute of the object.
|
* set tReplyId attribute of the object.
|
||||||
* @param $i integer id of the ticket_reply
|
* @param $i integer id of the ticket_reply
|
||||||
|
@ -237,7 +237,7 @@ class Ticket_Reply{
|
||||||
public function setTReplyId($i){
|
public function setTReplyId($i){
|
||||||
$this->tReplyId = $i;
|
$this->tReplyId = $i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set hidden attribute of the object.
|
* set hidden attribute of the object.
|
||||||
* @param $h should be 0 or 1
|
* @param $h should be 0 or 1
|
||||||
|
|
Loading…
Reference in a new issue