* code for task#1657.

This commit is contained in:
xia0ta0
2013-08-01 09:24:13 +08:00
parent 27d0d2b8ff
commit 9dc6bc2894
4 changed files with 31 additions and 7 deletions
+18 -3
View File
@@ -551,10 +551,25 @@ class testtask extends control
* @access public
* @return void
*/
public function unlinkCase($rowID)
public function unlinkCase($rowID, $confirm = 'no')
{
$this->dao->delete()->from(TABLE_TESTRUN)->where('id')->eq((int)$rowID)->exec();
die(js::reload('parent'));
if($confirm == 'no')
{
die(js::confirm($this->lang->testtask->confirmUnlinkCase, $this->createLink('testtask', 'unlinkCase', "rowID=$rowID&confirm=yes")));
}
else
{
$response['result'] = 'success';
$response['message'] = '';
$this->dao->delete()->from(TABLE_TESTRUN)->where('id')->eq((int)$rowID)->exec();
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
$this->send($response);
}
}
/**