Merge branch 'sprint/format-api' into 'master'
* Remove use exit for api. See merge request easycorp/zentaopms!5962
This commit is contained in:
@@ -16,7 +16,7 @@ class bugEntry extends entry
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($bugID)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ class bugEntry extends entry
|
||||
$bug->preAndNext['pre'] = $preAndNext->pre ? $preAndNext->pre->id : '';
|
||||
$bug->preAndNext['next'] = $preAndNext->next ? $preAndNext->next->id : '';
|
||||
|
||||
$this->send(200, $this->format($bug, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
|
||||
return $this->send(200, $this->format($bug, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,7 +86,7 @@ class bugEntry extends entry
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($bugID)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ class bugEntry extends entry
|
||||
if(!isset($data->status)) return $this->sendError(400, 'error');
|
||||
|
||||
$bug = $this->bug->getByID($bugID);
|
||||
$this->send(200, $this->format($bug, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
|
||||
return $this->send(200, $this->format($bug, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,7 +114,7 @@ class bugEntry extends entry
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($bugID)
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
class bugActiveEntry extends Entry
|
||||
class bugActiveEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($bugID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ class bugActiveEntry extends Entry
|
||||
|
||||
$bug = $this->loadModel('bug')->getByID($bugID);
|
||||
|
||||
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
class bugAssignEntry extends Entry
|
||||
class bugAssignEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($bugID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ class bugAssignEntry extends Entry
|
||||
|
||||
$bug = $this->loadModel('bug')->getByID($bugID);
|
||||
|
||||
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
class bugCloseEntry extends Entry
|
||||
class bugCloseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($bugID)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ class bugCloseEntry extends Entry
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
$bug = $this->loadModel('bug')->getByID($bugID);
|
||||
|
||||
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class bugConfirmEntry extends Entry
|
||||
class bugConfirmEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
**/
|
||||
public function post($bugID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ class bugConfirmEntry extends Entry
|
||||
|
||||
$bug = $this->loadModel('bug')->getById($bugID);
|
||||
|
||||
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class bugRecordEstimateEntry extends Entry
|
||||
class bugRecordEstimateEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($bugID)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ class bugRecordEstimateEntry extends Entry
|
||||
|
||||
$effort = $data->data->efforts;
|
||||
|
||||
$this->send(200, array('effort' => $effort));
|
||||
return $this->send(200, array('effort' => $effort));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ class bugRecordEstimateEntry extends Entry
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($bugID)
|
||||
{
|
||||
@@ -56,6 +56,6 @@ class bugRecordEstimateEntry extends Entry
|
||||
|
||||
$bug = $this->loadModel('bug')->getByID($bugID);
|
||||
|
||||
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
class bugResolveEntry extends Entry
|
||||
class bugResolveEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($bugID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ class bugResolveEntry extends Entry
|
||||
|
||||
$bug = $this->loadModel('bug')->getByID($bugID);
|
||||
|
||||
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,resolvedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,resolvedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class bugsEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ class bugsEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($productID = 0)
|
||||
{
|
||||
@@ -111,6 +111,6 @@ class bugsEntry extends entry
|
||||
|
||||
$bug = $this->loadModel('bug')->getByID($data->id);
|
||||
|
||||
$this->send(200, $this->format($bug, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
|
||||
return $this->send(200, $this->format($bug, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class buildEntry extends Entry
|
||||
class buildEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $buildID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($buildID)
|
||||
{
|
||||
@@ -37,7 +37,7 @@ class buildEntry extends Entry
|
||||
*
|
||||
* @param int $buildID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($buildID)
|
||||
{
|
||||
@@ -55,7 +55,7 @@ class buildEntry extends Entry
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$build = $this->build->getByID($buildID);
|
||||
$this->send(200, $this->format($build, 'builder:user,stories:idList,bugs:idList,deleted:bool'));
|
||||
return $this->send(200, $this->format($build, 'builder:user,stories:idList,bugs:idList,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ class buildEntry extends Entry
|
||||
*
|
||||
* @param int $buildID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($buildID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class buildsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -44,7 +44,7 @@ class buildsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -67,6 +67,6 @@ class buildsEntry extends entry
|
||||
|
||||
$build = $this->loadModel('build')->getByID($data->id);
|
||||
|
||||
$this->send(201, $build);
|
||||
return $this->send(201, $build);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class ciresultsEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -25,6 +25,6 @@ class ciresultsEntry extends entry
|
||||
$data = $this->getData();
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$this->send(201, array());
|
||||
return $this->send(201, array());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class configEntry extends baseEntry
|
||||
*
|
||||
* @param int $name language,version,timezone etc.
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($name)
|
||||
{
|
||||
@@ -44,6 +44,6 @@ class configEntry extends baseEntry
|
||||
return;
|
||||
}
|
||||
|
||||
$this->send(200, $config);
|
||||
return $this->send(200, $config);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class configsEntry extends baseEntry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
@@ -30,6 +30,6 @@ class configsEntry extends baseEntry
|
||||
$configs[] = array('key' => 'CRProduct', 'value' => $this->config->CRProduct);
|
||||
$configs[] = array('key' => 'CRExecution', 'value' => $this->config->CRExecution);
|
||||
|
||||
$this->send(200, $configs);
|
||||
return $this->send(200, $configs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class departmentEntry extends Entry
|
||||
class departmentEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $departmentID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($departmentID)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ class departmentEntry extends Entry
|
||||
*
|
||||
* @param int $departmentID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($departmentID)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ class departmentEntry extends Entry
|
||||
|
||||
$this->getData();
|
||||
$department = $this->dept->getByID($departmentID);
|
||||
$this->send(200, $department);
|
||||
return $this->send(200, $department);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ class departmentEntry extends Entry
|
||||
*
|
||||
* @param int $departmentID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($departmentID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class docEntry extends entry
|
||||
*
|
||||
* @param int $docID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($docID)
|
||||
{
|
||||
@@ -43,7 +43,7 @@ class docEntry extends entry
|
||||
$doc->preAndNext['pre'] = $preAndNext->pre ? $preAndNext->pre->id : '';
|
||||
$doc->preAndNext['next'] = $preAndNext->next ? $preAndNext->next->id : '';
|
||||
|
||||
$this->send(200, $this->format($doc, 'addedBy:user,addedDate:time,assignedTo:user,assignedDate:date,editedBy:user,editedDate:time,mailto:userList'));
|
||||
return $this->send(200, $this->format($doc, 'addedBy:user,addedDate:time,assignedTo:user,assignedDate:date,editedBy:user,editedDate:time,mailto:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,7 @@ class docEntry extends entry
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($storyID)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ class docEntry extends entry
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($storyID)
|
||||
{
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class doclibsEntry extends Entry
|
||||
class doclibsEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class docsEntry extends Entry
|
||||
class docsEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($libID = 0)
|
||||
{
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class errorEntry extends Entry
|
||||
class errorEntry extends entry
|
||||
{
|
||||
/**
|
||||
* 404 Not Found.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function notFound()
|
||||
{
|
||||
$this->send(404, array('error' => 'not found'));
|
||||
return $this->send(404, array('error' => 'not found'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class executionEntry extends Entry
|
||||
class executionEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID)
|
||||
{
|
||||
@@ -113,7 +113,7 @@ class executionEntry extends Entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($executionID)
|
||||
{
|
||||
@@ -136,7 +136,7 @@ class executionEntry extends Entry
|
||||
if(!isset($data->result)) return $this->sendError(400, 'error');
|
||||
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
$this->send(200, $this->format($execution, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,PM:user,PO:user,RD:user,QD:user,whitelist:userList,begin:date,end:date,realBegan:date,realEnd:date,deleted:bool'));
|
||||
return $this->send(200, $this->format($execution, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,PM:user,PO:user,RD:user,QD:user,whitelist:userList,begin:date,end:date,realBegan:date,realEnd:date,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -144,7 +144,7 @@ class executionEntry extends Entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($executionID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class executionBugsEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID = 0)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class executionBuildsEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID = 0)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class executionCasesEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID = 0)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class executionsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ class executionsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -102,14 +102,14 @@ class executionsEntry extends entry
|
||||
|
||||
$execution = $this->loadModel('execution')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($execution, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,PM:user,PO:user,RD:user,QD:user,whitelist:userList,begin:date,end:date,realBegan:date,realEnd:date,deleted:bool'));
|
||||
return $this->send(201, $this->format($execution, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,PM:user,PO:user,RD:user,QD:user,whitelist:userList,begin:date,end:date,realBegan:date,realEnd:date,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get drop menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -148,6 +148,6 @@ class executionsEntry extends entry
|
||||
}
|
||||
}
|
||||
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class executionStoriesEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID)
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class feedbackEntry extends Entry
|
||||
class feedbackEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $feedbackID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($feedbackID)
|
||||
{
|
||||
@@ -37,7 +37,7 @@ class feedbackEntry extends Entry
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$feedback->actions = $this->loadModel('action')->processActionForAPI($data->data->actions, $data->data->users, $this->lang->feedback);
|
||||
$this->send(200, $this->format($feedback, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
|
||||
return $this->send(200, $this->format($feedback, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -45,7 +45,7 @@ class feedbackEntry extends Entry
|
||||
*
|
||||
* @param int $feedbackID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($feedbackID)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ class feedbackEntry extends Entry
|
||||
*
|
||||
* @param int $feedbackID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($feedbackID)
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class feedbackAssignToEntry extends Entry
|
||||
class feedbackAssignToEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $feedbackID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($feedbackID)
|
||||
{
|
||||
@@ -34,6 +34,6 @@ class feedbackAssignToEntry extends Entry
|
||||
|
||||
$feedback = $this->loadModel('feedback')->getById($feedbackID);
|
||||
|
||||
$this->send(200, $this->format($feedback, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
|
||||
return $this->send(200, $this->format($feedback, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class feedbackCloseEntry extends Entry
|
||||
class feedbackCloseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $feedbackID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($feedbackID)
|
||||
{
|
||||
@@ -36,6 +36,6 @@ class feedbackCloseEntry extends Entry
|
||||
|
||||
$feedback = $this->loadModel('feedback')->getById($feedbackID);
|
||||
|
||||
$this->send(200, $feedback);
|
||||
return $this->send(200, $feedback);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class feedbacksEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
@@ -50,7 +50,7 @@ class feedbacksEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -68,14 +68,14 @@ class feedbacksEntry extends entry
|
||||
|
||||
$feedback = $this->loadModel('feedback')->getById($data->id);
|
||||
|
||||
$this->send(201, $this->format($feedback, 'openedBy:user,openedDate:time,reviewedBy:user,reviewedDate:time,processedBy:user,processedDate:time,closedBy:user,closedDate:time,editedBy:user,editedDate:time,assignedTo:user,assignedDate:time,feedbackBy:user,mailto:userList,deleted:bool'));
|
||||
return $this->send(201, $this->format($feedback, 'openedBy:user,openedDate:time,reviewedBy:user,reviewedDate:time,processedBy:user,processedDate:time,closedBy:user,closedDate:time,editedBy:user,editedDate:time,assignedTo:user,assignedDate:time,feedbackBy:user,mailto:userList,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getModuleAndProduct()
|
||||
{
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class fileEntry extends Entry
|
||||
class fileEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($fileID)
|
||||
{
|
||||
@@ -26,13 +26,13 @@ class fileEntry extends Entry
|
||||
if(!$data or !isset($data->status)) return $this->send400('error');
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$this->send(200, $data);
|
||||
return $this->send(200, $data);
|
||||
}
|
||||
/**
|
||||
* PUT method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($fileID)
|
||||
{
|
||||
@@ -40,6 +40,6 @@ class fileEntry extends Entry
|
||||
$action = $this->param('action', '');
|
||||
if($action == 'remove') unset($_SESSION['album']['used'][$uid][$fileID]);
|
||||
|
||||
$this->send(200, array('id' => $fileID));
|
||||
return $this->send(200, array('id' => $fileID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class filesEntry extends Entry
|
||||
class filesEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -29,6 +29,6 @@ class filesEntry extends Entry
|
||||
if(!$data or !isset($data->status)) return $this->send400('error');
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$this->send(200, array('id' => $data->id, 'url' => $data->url));
|
||||
return $this->send(200, array('id' => $data->id, 'url' => $data->url));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class gitlabWebhookEntry extends baseEntry
|
||||
* Repo webhook.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class groupsEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class issueEntry extends Entry
|
||||
class issueEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int|string $issueID. Issues id for Gitlab has '-', such as task-1, bug-1.
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($issueID)
|
||||
{
|
||||
@@ -40,7 +40,7 @@ class issueEntry extends Entry
|
||||
*
|
||||
* @param int $issueID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($issueID)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ class issueEntry extends Entry
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$issue = $this->issue->getByID($issueID);
|
||||
$this->send(200, $this->format($issue, 'createdDate:time,editedDate:time,assignedDate:time'));
|
||||
return $this->send(200, $this->format($issue, 'createdDate:time,editedDate:time,assignedDate:time'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,7 +66,7 @@ class issueEntry extends Entry
|
||||
*
|
||||
* @param int $issueID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($issueID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class issuesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ class issuesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
private function getProjectIssues($projectID)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ class issuesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -95,6 +95,6 @@ class issuesEntry extends entry
|
||||
|
||||
$issue = $this->loadModel('issue')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($issue, 'createdDate:time,editedDate:time,assignedDate:time'));
|
||||
return $this->send(201, $this->format($issue, 'createdDate:time,editedDate:time,assignedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class jobsEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class langsEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class meetingsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ class meetingsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -75,6 +75,6 @@ class meetingsEntry extends entry
|
||||
|
||||
$risk = $this->loadModel('risk')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
return $this->send(201, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class modulesEntry extends Entry
|
||||
class modulesEntry extends entry
|
||||
{
|
||||
/**
|
||||
* Get method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class mrEntry extends baseEntry
|
||||
* Create mr.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -28,6 +28,6 @@ class mrEntry extends baseEntry
|
||||
if(dao::isError()) $this->sendError(400, dao::getError());
|
||||
|
||||
$MR = $this->mr->getByID($MRID);
|
||||
$this->send(201, $MR);
|
||||
return $this->send(201, $MR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class optionsEntry extends entry
|
||||
*
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($type = '')
|
||||
{
|
||||
|
||||
@@ -15,10 +15,10 @@ class pingEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
$this->send(200, array('token' => session_id(), 'tokenLife' => ini_get('session.gc_maxlifetime')));
|
||||
return $this->send(200, array('token' => session_id(), 'tokenLife' => ini_get('session.gc_maxlifetime')));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class pipelinesEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class productEntry extends Entry
|
||||
class productEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID)
|
||||
{
|
||||
@@ -103,7 +103,7 @@ class productEntry extends Entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($productID)
|
||||
{
|
||||
@@ -120,7 +120,7 @@ class productEntry extends Entry
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$product = $this->product->getByID($productID);
|
||||
$this->send(200, $this->format($product, 'createdDate:time,whitelist:userList,createdBy:user,PO:user,RD:user,QD:user'));
|
||||
return $this->send(200, $this->format($product, 'createdDate:time,whitelist:userList,createdBy:user,PO:user,RD:user,QD:user'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,7 +128,7 @@ class productEntry extends Entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($productID)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ class productIssueEntry extends entry
|
||||
*
|
||||
* @param string $issueID, such as task-1, story-1, bug-1
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($issueID)
|
||||
{
|
||||
@@ -142,7 +142,7 @@ class productIssueEntry extends entry
|
||||
}
|
||||
$issue->openedBy = $profileList[$issue->openedBy];
|
||||
|
||||
$this->send(200, array('issue' => $this->format($issue, 'openedDate:time,lastEditedDate:time')));
|
||||
return $this->send(200, array('issue' => $this->format($issue, 'openedDate:time,lastEditedDate:time')));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@ class productIssuesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID)
|
||||
{
|
||||
@@ -166,7 +166,7 @@ class productIssuesEntry extends entry
|
||||
$issues = $page < 1 ? array() : array_slice($issues, ($page-1) * $limit, $limit);
|
||||
|
||||
$result = $this->processIssues($issues);
|
||||
$this->send(200, array('page' => $page, 'total' => $total, 'limit' => $limit, 'issues' => $result));
|
||||
return $this->send(200, array('page' => $page, 'total' => $total, 'limit' => $limit, 'issues' => $result));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class productplanEntry extends Entry
|
||||
class productplanEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($planID)
|
||||
{
|
||||
@@ -43,7 +43,7 @@ class productplanEntry extends Entry
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($planID)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ class productplanEntry extends Entry
|
||||
$plan->stories = $data->data->planStories;
|
||||
$plan->bugs = $data->data->planBugs;
|
||||
|
||||
$this->send(200, $this->format($plan, 'begin:date,end:date,deleted:bool,stories:array,bugs:array'));
|
||||
return $this->send(200, $this->format($plan, 'begin:date,end:date,deleted:bool,stories:array,bugs:array'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,7 +79,7 @@ class productplanEntry extends Entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($planID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class productplanLinkBugsEntry extends entry
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($planID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class productplanLinkStoriesEntry extends entry
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($planID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class productplansEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ class productplansEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($productID = 0)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class productplanUnlinkBugsEntry extends entry
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($planID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class productplanUnlinkStoriesEntry extends entry
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($planID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class productProjectsEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -59,7 +59,7 @@ class productProjectsEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -84,14 +84,14 @@ class productProjectsEntry extends entry
|
||||
|
||||
$project = $this->loadModel('project')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($project, 'openedDate:time,lastEditedDate:time,closedDate:time,canceledDate:time'));
|
||||
return $this->send(201, $this->format($project, 'openedDate:time,lastEditedDate:time,closedDate:time,canceledDate:time'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get drop menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -123,6 +123,6 @@ class productProjectsEntry extends entry
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class productsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($programID = 0)
|
||||
{
|
||||
@@ -108,7 +108,7 @@ class productsEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -130,14 +130,14 @@ class productsEntry extends entry
|
||||
$product = $this->loadModel('product')->getByID($data->id);
|
||||
$product = $this->format($product, 'createdDate:time,whitelist:userList,createdBy:user,PO:user,RD:user,QD:user');
|
||||
|
||||
$this->send(200, $product);
|
||||
return $this->send(200, $product);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get dropmenu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -168,7 +168,7 @@ class productsEntry extends entry
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -176,7 +176,7 @@ class productsEntry extends entry
|
||||
*
|
||||
* @param array $products
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function mergeChildren($products)
|
||||
{
|
||||
|
||||
@@ -9,21 +9,21 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class programEntry extends Entry
|
||||
class programEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($programID)
|
||||
{
|
||||
$program = $this->loadModel('program')->getByID($programID);
|
||||
if(!$program) return $this->send404();
|
||||
|
||||
$this->send(200, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
return $this->send(200, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ class programEntry extends Entry
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($programID)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ class programEntry extends Entry
|
||||
|
||||
$this->getData();
|
||||
$program = $this->program->getByID($programID);
|
||||
$this->send(200, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
return $this->send(200, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ class programEntry extends Entry
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($programID)
|
||||
{
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class programsEntry extends Entry
|
||||
class programsEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
@@ -71,7 +71,7 @@ class programsEntry extends Entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -89,14 +89,14 @@ class programsEntry extends Entry
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$program = $this->loadModel('program')->getByID($data->id);
|
||||
$this->send(201, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
return $this->send(201, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get drop menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -122,6 +122,6 @@ class programsEntry extends Entry
|
||||
}
|
||||
}
|
||||
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class projectEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ class projectEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($projectID)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ class projectEntry extends entry
|
||||
if(!isset($data->result)) return $this->sendError(400, 'error');
|
||||
|
||||
$project = $this->project->getByID($projectID);
|
||||
$this->send(200, $this->format($project, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,realBegan:date,realEnd:date,PM:user,whitelist:userList,deleted:bool'));
|
||||
return $this->send(200, $this->format($project, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,realBegan:date,realEnd:date,PM:user,whitelist:userList,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,7 +131,7 @@ class projectEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($projectID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class projectBugsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class projectCasesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class projectReleasesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ class projectReleasesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -72,6 +72,6 @@ class projectReleasesEntry extends entry
|
||||
|
||||
$release = $this->loadModel('projectrelease')->getByID($data->id);
|
||||
|
||||
$this->send(201, $release);
|
||||
return $this->send(201, $release);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class projectsEntry extends entry
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($programID = 0)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ class projectsEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -99,14 +99,14 @@ class projectsEntry extends entry
|
||||
|
||||
$project = $this->loadModel('project')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($project, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,realBegan:date,realEnd:date,PM:user,whitelist:userList,deleted:bool'));
|
||||
return $this->send(201, $this->format($project, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,realBegan:date,realEnd:date,PM:user,whitelist:userList,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get drop menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -138,6 +138,6 @@ class projectsEntry extends entry
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class projectStoriesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID)
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class releaseEntry extends Entry
|
||||
class releaseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($releaseID)
|
||||
{
|
||||
@@ -37,7 +37,7 @@ class releaseEntry extends Entry
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($releaseID)
|
||||
{
|
||||
@@ -62,7 +62,7 @@ class releaseEntry extends Entry
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($releaseID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class releasesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class reportsEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class repoRulesEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
@@ -27,6 +27,6 @@ class repoRulesEntry extends entry
|
||||
if(!$data or !isset($data->status)) return $this->send400('error');
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$this->send(200, $data->rules);
|
||||
return $this->send(200, $data->rules);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class reposEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class riskEntry extends Entry
|
||||
class riskEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $riskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($riskID)
|
||||
{
|
||||
@@ -36,7 +36,7 @@ class riskEntry extends Entry
|
||||
*
|
||||
* @param int $riskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($riskID)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ class riskEntry extends Entry
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$risk = $this->risk->getByID($riskID);
|
||||
$this->send(200, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
return $this->send(200, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,7 +62,7 @@ class riskEntry extends Entry
|
||||
*
|
||||
* @param int $riskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($riskID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class risksEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -56,7 +56,7 @@ class risksEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -82,6 +82,6 @@ class risksEntry extends entry
|
||||
|
||||
$risk = $this->loadModel('risk')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
return $this->send(201, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class stakeholdersEntry extends entry
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($programID = 0)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ class stakeholdersEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -88,14 +88,14 @@ class stakeholdersEntry extends entry
|
||||
|
||||
$project = $this->loadModel('project')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($project, 'openedDate:time,lastEditedDate:time,closedDate:time,canceledDate:time'));
|
||||
return $this->send(201, $this->format($project, 'openedDate:time,lastEditedDate:time,closedDate:time,canceledDate:time'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get drop menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -127,6 +127,6 @@ class stakeholdersEntry extends entry
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class storiesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -60,7 +60,7 @@ class storiesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($productID = 0)
|
||||
{
|
||||
@@ -88,6 +88,6 @@ class storiesEntry extends entry
|
||||
if(isset($data->result) and !isset($data->id)) return $this->sendError(400, $data->message);
|
||||
|
||||
$story = $this->loadModel('story')->getByID($data->id);
|
||||
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyEntry extends Entry
|
||||
class storyEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($storyID)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ class storyEntry extends Entry
|
||||
$story->preAndNext['pre'] = $preAndNext->pre ? $preAndNext->pre->id : '';
|
||||
$story->preAndNext['next'] = $preAndNext->next ? $preAndNext->next->id : '';
|
||||
|
||||
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,7 +89,7 @@ class storyEntry extends Entry
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($storyID)
|
||||
{
|
||||
@@ -108,7 +108,7 @@ class storyEntry extends Entry
|
||||
if(!isset($data->status)) return $this->sendError(400, 'error');
|
||||
|
||||
$story = $this->story->getByID($storyID);
|
||||
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,7 +116,7 @@ class storyEntry extends Entry
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($storyID)
|
||||
{
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
|
||||
class storyActiveEntry extends Entry
|
||||
class storyActiveEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class storyActiveEntry extends Entry
|
||||
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
|
||||
$this->send(200, $story);
|
||||
return $this->send(200, $story);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyAssignToEntry extends Entry
|
||||
class storyAssignToEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -32,6 +32,6 @@ class storyAssignToEntry extends Entry
|
||||
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
|
||||
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyChangeEntry extends Entry
|
||||
class storyChangeEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -45,6 +45,6 @@ class storyChangeEntry extends Entry
|
||||
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
|
||||
$this->send(200, $this->format($story, 'openedDate:time,assignedDate:time,reviewedDate:time,lastEditedDate:time,closedDate:time'));
|
||||
return $this->send(200, $this->format($story, 'openedDate:time,assignedDate:time,reviewedDate:time,lastEditedDate:time,closedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyCloseEntry extends Entry
|
||||
class storyCloseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -32,6 +32,6 @@ class storyCloseEntry extends Entry
|
||||
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
|
||||
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyRecallEntry extends Entry
|
||||
class storyRecallEntry extends entry
|
||||
{
|
||||
/**
|
||||
* Delete method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($storyID)
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyRecordEstimateEntry extends Entry
|
||||
class storyRecordEstimateEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($storyID)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ class storyRecordEstimateEntry extends Entry
|
||||
|
||||
$effort = $data->data->efforts;
|
||||
|
||||
$this->send(200, array('effort' => $effort));
|
||||
return $this->send(200, array('effort' => $effort));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ class storyRecordEstimateEntry extends Entry
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -56,6 +56,6 @@ class storyRecordEstimateEntry extends Entry
|
||||
|
||||
$story = $this->loadModel('story')->getById($storyID);
|
||||
|
||||
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
|
||||
class storyReviewEntry extends Entry
|
||||
class storyReviewEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class storyReviewEntry extends Entry
|
||||
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
|
||||
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class tabsEntry extends baseEntry
|
||||
*
|
||||
* @param string $moduleName work|
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($moduleName)
|
||||
{
|
||||
@@ -76,6 +76,6 @@ class tabsEntry extends baseEntry
|
||||
}
|
||||
}
|
||||
|
||||
$this->send(200, array('tabs' => $menus));
|
||||
return $this->send(200, array('tabs' => $menus));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskEntry extends Entry
|
||||
class taskEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($taskID)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ class taskEntry extends Entry
|
||||
$execution = $this->loadModel('project')->getByID($task->execution, 'execution');
|
||||
$task->executionStatus = $execution->status;
|
||||
|
||||
$this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,7 +98,7 @@ class taskEntry extends Entry
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($taskID)
|
||||
{
|
||||
@@ -114,7 +114,7 @@ class taskEntry extends Entry
|
||||
$data = $this->getData();
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
$task = $this->task->getByID($taskID);
|
||||
$this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,7 +122,7 @@ class taskEntry extends Entry
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($taskID)
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
class taskActiveEntry extends Entry
|
||||
class taskActiveEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ class taskActiveEntry extends Entry
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$this->send(200, $this->format($task, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($task, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskAssignToEntry extends Entry
|
||||
class taskAssignToEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -36,6 +36,6 @@ class taskAssignToEntry extends Entry
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$this->send(200, $this->format($task, 'openedDate:time,assignedDate:time,realStarted:time,finishedDate:time,canceledDate:time,closedDate:time,lastEditedDate:time'));
|
||||
return $this->send(200, $this->format($task, 'openedDate:time,assignedDate:time,realStarted:time,finishedDate:time,canceledDate:time,closedDate:time,lastEditedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskBatchCreateEntry extends Entry
|
||||
class taskBatchCreateEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($executionID = 0)
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskCloseEntry extends Entry
|
||||
class taskCloseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -34,6 +34,6 @@ class taskCloseEntry extends Entry
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$this->send(200, $task);
|
||||
return $this->send(200, $task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskComponentEntry extends Entry
|
||||
class taskComponentEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -35,7 +35,7 @@ class taskComponentEntry extends Entry
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$task = $this->task->getById($data->idList[0]);
|
||||
$this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
|
||||
public function setArrayPost($field)
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskFinishEntry extends Entry
|
||||
class taskFinishEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -41,6 +41,6 @@ class taskFinishEntry extends Entry
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$this->send(200, $this->format($task, 'openedDate:time,assignedDate:time,realStarted:time,finishedDate:time,canceledDate:time,closedDate:time,lastEditedDate:time'));
|
||||
return $this->send(200, $this->format($task, 'openedDate:time,assignedDate:time,realStarted:time,finishedDate:time,canceledDate:time,closedDate:time,lastEditedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskPauseEntry extends Entry
|
||||
class taskPauseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -34,6 +34,6 @@ class taskPauseEntry extends Entry
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$this->send(200, $task);
|
||||
return $this->send(200, $task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskRecordEstimateEntry extends Entry
|
||||
class taskRecordEstimateEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($taskID)
|
||||
{
|
||||
@@ -39,7 +39,7 @@ class taskRecordEstimateEntry extends Entry
|
||||
$effort = new stdclass();
|
||||
if($issetEffort and $data->data->efforts) $effort = $data->data->efforts;
|
||||
if(!$issetEffort and $data->data->estimates) $effort = $data->data->estimates;
|
||||
$this->send(200, array('effort' => $effort));
|
||||
return $this->send(200, array('effort' => $effort));
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class taskRecordEstimateEntry extends Entry
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -73,6 +73,6 @@ class taskRecordEstimateEntry extends Entry
|
||||
|
||||
$task = $this->loadModel('task')->getById($taskID);
|
||||
|
||||
$this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class tasksEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID = 0)
|
||||
{
|
||||
@@ -57,7 +57,7 @@ class tasksEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($executionID)
|
||||
{
|
||||
@@ -78,6 +78,6 @@ class tasksEntry extends entry
|
||||
|
||||
$task = $this->loadModel('task')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
|
||||
return $this->send(201, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskStartEntry extends Entry
|
||||
class taskStartEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -35,6 +35,6 @@ class taskStartEntry extends Entry
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$this->send(200, $task);
|
||||
return $this->send(200, $task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class testcaseEntry extends entry
|
||||
*
|
||||
* @param int $testcaseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($testcaseID)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ class testcaseEntry extends entry
|
||||
$case = $data->case;
|
||||
$case->steps = (isset($case->steps) and !empty($case->steps)) ? array_values(get_object_vars($case->steps)) : array();
|
||||
|
||||
$this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,steps:array,deleted:bool'));
|
||||
return $this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,steps:array,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ class testcaseEntry extends entry
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($caseID)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ class testcaseEntry extends entry
|
||||
|
||||
$this->getData();
|
||||
$case = $this->testcase->getByID($caseID);
|
||||
$this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,steps:array,deleted:bool'));
|
||||
return $this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,steps:array,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,7 +79,7 @@ class testcaseEntry extends entry
|
||||
*
|
||||
* @param int $testcaseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($testcaseID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class testcasesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ class testcasesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($productID = 0)
|
||||
{
|
||||
@@ -106,6 +106,6 @@ class testcasesEntry extends entry
|
||||
$case = $this->loadModel('testcase')->getByID($data->id);
|
||||
$case->steps = (isset($case->steps) and !empty($case->steps)) ? array_values($case->steps) : array();
|
||||
|
||||
$this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,deleted:bool'));
|
||||
return $this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,deleted:bool'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class testresultsEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($caseID = 0)
|
||||
{
|
||||
@@ -50,7 +50,7 @@ class testresultsEntry extends entry
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($caseID = 0)
|
||||
{
|
||||
@@ -83,6 +83,6 @@ class testresultsEntry extends entry
|
||||
$data = $this->getData();
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$this->send(200, array());
|
||||
return $this->send(200, array());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class testsuiteEntry extends entry
|
||||
*
|
||||
* @param int $testsuiteID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($testsuiteID)
|
||||
{
|
||||
@@ -36,7 +36,7 @@ class testsuiteEntry extends entry
|
||||
$suite->testcases[] = $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,deleted:bool');
|
||||
}
|
||||
|
||||
$this->send(200, $suite);
|
||||
return $this->send(200, $suite);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,7 @@ class testsuiteEntry extends entry
|
||||
*
|
||||
* @param int $testsuiteID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($testsuiteID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class testsuitesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ class testsuitesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($productID = 0)
|
||||
{
|
||||
@@ -74,6 +74,6 @@ class testsuitesEntry extends entry
|
||||
|
||||
$suite = $this->loadModel('testsuite')->getByID($data->id);
|
||||
|
||||
$this->send(200, $this->format($suite, 'addedBy:user,addedDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool'));
|
||||
return $this->send(200, $this->format($suite, 'addedBy:user,addedDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class testtaskEntry extends entry
|
||||
*
|
||||
* @param int $testtaskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($testtaskID)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class testtaskEntry extends entry
|
||||
$testtask->testcases[] = $this->format($run, 'openedBy:user,openedDate:time,reviewedBy:user,reviewedDate:date,lastEditedBy:user,lastEditedDate:time');
|
||||
}
|
||||
|
||||
$this->send(200, $this->format($testtask, 'begin:date,end:date,mailto:userList,owner:user,realFinishedDate:time'));
|
||||
return $this->send(200, $this->format($testtask, 'begin:date,end:date,mailto:userList,owner:user,realFinishedDate:time'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ class testtaskEntry extends entry
|
||||
*
|
||||
* @param int $testtaskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($testtaskID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class testtasksEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -46,7 +46,7 @@ class testtasksEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
private function getProjectTesttasks($projectID)
|
||||
{
|
||||
@@ -72,7 +72,7 @@ class testtasksEntry extends entry
|
||||
*
|
||||
* @access public
|
||||
* @param int $projectID
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -103,6 +103,6 @@ class testtasksEntry extends entry
|
||||
|
||||
$testtask = $this->loadModel('testtask')->getByID($data->id);
|
||||
|
||||
$this->send(201, $testtask);
|
||||
return $this->send(201, $testtask);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class todoEntry extends entry
|
||||
*
|
||||
* @param int $todoID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($todoID)
|
||||
{
|
||||
@@ -29,7 +29,7 @@ class todoEntry extends entry
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$todo = $data->data->todo;
|
||||
$this->send(200, $this->format($todo, 'assignedDate:time,finishedDate:time,closedDate:time'));
|
||||
return $this->send(200, $this->format($todo, 'assignedDate:time,finishedDate:time,closedDate:time'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ class todoEntry extends entry
|
||||
*
|
||||
* @param int $todoID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($todoID)
|
||||
{
|
||||
@@ -61,7 +61,7 @@ class todoEntry extends entry
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$todo = $this->todo->getByID($todoID);
|
||||
$this->send(200, $this->format($todo, 'assignedDate:time,finishedDate:time,closedDate:time'));
|
||||
return $this->send(200, $this->format($todo, 'assignedDate:time,finishedDate:time,closedDate:time'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,7 +69,7 @@ class todoEntry extends entry
|
||||
*
|
||||
* @param int $todoID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($todoID)
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class todoActivateEntry extends Entry
|
||||
class todoActivateEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($todoID)
|
||||
{
|
||||
@@ -28,6 +28,6 @@ class todoActivateEntry extends Entry
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$todo = $this->loadModel('todo')->getByID($todoID);
|
||||
$this->send(200, $this->format($todo, 'assignedDate:time,finishedDate:time,closedDate:time'));
|
||||
return $this->send(200, $this->format($todo, 'assignedDate:time,finishedDate:time,closedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class todoFinishEntry extends Entry
|
||||
class todoFinishEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($todoID)
|
||||
{
|
||||
@@ -28,6 +28,6 @@ class todoFinishEntry extends Entry
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$todo = $this->loadModel('todo')->getByID($todoID);
|
||||
$this->send(200, $this->format($todo, 'assignedDate:time,finishedDate:time,closedDate:time'));
|
||||
return $this->send(200, $this->format($todo, 'assignedDate:time,finishedDate:time,closedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user