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

Remove unnecesarry functions/calls

parent 6142ea55
No related branches found
No related tags found
No related merge requests found
......@@ -181,8 +181,6 @@ class TicketsAjaxAPI extends AjaxController {
function acquireLock($tid) {
global $cfg,$thisstaff;
$this->csrf_protect();
if(!$tid or !is_numeric($tid) or !$thisstaff or !$cfg)
return 0;
......@@ -216,8 +214,6 @@ class TicketsAjaxAPI extends AjaxController {
function renewLock($tid, $id) {
global $thisstaff;
$this->csrf_protect();
if(!$id or !is_numeric($id) or !$thisstaff)
return $this->json_encode(array('id'=>0, 'retry'=>true));
......@@ -237,8 +233,6 @@ class TicketsAjaxAPI extends AjaxController {
function releaseLock($tid, $id=0) {
global $thisstaff;
$this->csrf_protect();
if($id && is_numeric($id)){ //Lock Id provided!
$lock = TicketLock::lookup($id, $tid);
......
......@@ -51,10 +51,6 @@ class AjaxController extends ApiController {
return $this->json_encode($what);
}
function csrf_protect() {
csrf_ensure_cookie();
}
function get($var, $default=null) {
return (isset($_GET[$var])) ? $_GET[$var] : $default;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment