* adjust for api.
This commit is contained in:
@@ -24,7 +24,11 @@ class bugEntry extends entry
|
||||
$control->view($bugID);
|
||||
|
||||
$data = $this->getData();
|
||||
$bug = $data->data->bug;
|
||||
|
||||
if(!$data or !isset($data->status)) return $this->send400('error');
|
||||
if(isset($data->status) and $data->status == 'fail') return isset($data->code) and $data->code == 404 ? $this->send404() : $this->sendError(400, $data->message);
|
||||
|
||||
$bug = $data->data->bug;
|
||||
|
||||
/* Set product name */
|
||||
$bug->productName = $data->data->product->name;
|
||||
|
||||
@@ -23,7 +23,11 @@ class storyEntry extends Entry
|
||||
$control = $this->loadController('story', 'view');
|
||||
$control->view($storyID);
|
||||
|
||||
$data = $this->getData();
|
||||
$data = $this->getData();
|
||||
|
||||
if(!$data or !isset($data->status)) return $this->send400('error');
|
||||
if(isset($data->status) and $data->status == 'fail') return isset($data->code) and $data->code == 404 ? $this->send404() : $this->sendError(400, $data->message);
|
||||
|
||||
$story = $data->data->story;
|
||||
|
||||
if(!empty($story->children)) $story->children = array_values((array)$story->children);
|
||||
|
||||
@@ -1865,9 +1865,10 @@ EOD;
|
||||
{
|
||||
$queryObjects = $this->dao->query($sql);
|
||||
$objectList = array();
|
||||
$key = 'id';
|
||||
while($object = $queryObjects->fetch())
|
||||
{
|
||||
$key = (!$this->session->$typeOnlyCondition and $type == 'testcase' and isset($object->case)) ? 'case' : 'id';
|
||||
if(!$this->session->$typeOnlyCondition and $type == 'testcase' and isset($object->case)) $key = 'case';
|
||||
$id = $object->$key;
|
||||
$objectList[$id] = $id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user