diff --git a/framework/api/router.class.php b/framework/api/router.class.php index 35848b579a..209d3ad4d5 100644 --- a/framework/api/router.class.php +++ b/framework/api/router.class.php @@ -429,6 +429,8 @@ class api extends router 'testcaseID' => TABLE_CASE, 'user' => TABLE_USER, 'userID' => TABLE_USER, + 'ticket' => TABLE_TICKET, + 'ticketID' => TABLE_TICKET, ]; $params = array_merge($this->params, $_POST); @@ -436,7 +438,7 @@ class api extends router { if(isset($objectMap[$key]) && $value != 0) { - $id = $this->dao->select('id')->from($objectMap[$key])->where('id')->eq($value)->fetch('id'); + $id = $this->dao->select('id')->from($objectMap[$key])->where('id')->eq($value)->andWhere('deleted')->eq('0')->fetch('id'); if(!$id) return $this->control->sendError(ucfirst(str_replace('ID', '', $key)) . ' does not exist.'); } } diff --git a/www/api.php b/www/api.php index 1cd47d0d96..4175466984 100644 --- a/www/api.php +++ b/www/api.php @@ -13,6 +13,7 @@ */ /* Set the error reporting. */ error_reporting(0); +ini_set('zlib.output_compression', 'Off'); /* Start output buffer. */ ob_start();