Skip to content
Snippets Groups Projects
Commit 6c5921cf authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #878 from greezybacon/issue/ticket-lock-lookup


Fix parameter count to TicketLock::lookup

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 5e8e2335 d8c001e1
No related branches found
No related tags found
No related merge requests found
......@@ -191,7 +191,7 @@ class TicketsAjaxAPI extends AjaxController {
function acquireLock($tid) {
global $cfg,$thisstaff;
if(!$tid or !is_numeric($tid) or !$thisstaff or !$cfg or !$cfg->getLockTime())
if(!$tid || !is_numeric($tid) || !$thisstaff || !$cfg || !$cfg->getLockTime())
return 0;
if(!($ticket = Ticket::lookup($tid)) || !$ticket->checkStaffAccess($thisstaff))
......@@ -218,10 +218,10 @@ class TicketsAjaxAPI extends AjaxController {
function renewLock($tid, $id) {
global $thisstaff;
if(!$id or !is_numeric($id) or !$thisstaff)
if(!$tid || !is_numeric($tid) || !$id || !is_numeric($id) || !$thisstaff)
return $this->json_encode(array('id'=>0, 'retry'=>true));
$lock= TicketLock::lookup($id);
$lock= TicketLock::lookup($id, $tid);
if(!$lock || !$lock->getStaffId() || $lock->isExpired()) //Said lock doesn't exist or is is expired
return self::acquireLock($tid); //acquire the lock
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment