# ticket queues, though moving away from this approach
--HG-- branch : quitta-gsoc-2013hg/feature/sse2
parent
b64d27a427
commit
5a8f45f88c
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
class Ticket_Queue_csr extends Ticket_Queue{
|
||||
|
||||
public function loadAllNewCsrTickets(){
|
||||
$dbl = new DBLayer("lib");
|
||||
$statement = $dbl->executeWithoutParams("SELECT ticket . * FROM ticket LEFT JOIN assigned ON ticket.TId = assigned.Ticket WHERE assigned.Ticket IS NULL");
|
||||
$rows = $statement->fetchAll();
|
||||
$this->setQueue($rows);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
class Ticket_Queue_Handler{
|
||||
|
||||
public static function getTickets($input,$permission){
|
||||
switch($permission){
|
||||
case 2:
|
||||
$queue = new Ticket_Queue_Csr();
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// $queue = new Ticket_Queue_Dev();
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($input){
|
||||
case "all_open":
|
||||
$queue->loadAllOpenTickets();
|
||||
break;
|
||||
case "archive":
|
||||
$queue->loadAllClosedTickets();
|
||||
break;
|
||||
default:
|
||||
return "ERROR";
|
||||
}
|
||||
|
||||
return $queue->getTickets();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue