* code for task#1657.

This commit is contained in:
xia0ta0
2013-08-01 10:51:35 +08:00
parent 01be295d5a
commit 49bc364c61
+15 -7
View File
@@ -443,17 +443,25 @@ class testtask extends control
}
else
{
$response['result'] = 'success';
$response['message'] = '';
$task = $this->testtask->getByID($taskID);
$this->testtask->delete(TABLE_TESTTASK, $taskID);
if(dao::isError())
/* if ajax request, send result. */
if($this->server->ajax)
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
else
{
$response['result'] = 'success';
$response['message'] = '';
}
$this->send($response);
}
$this->send($response);
die(js::locate(inlink('browse', "product=$task->product"), 'parent'));
}
}