* Optimize function executeHooks.

This commit is contained in:
liugang
2019-07-24 10:49:41 +08:00
parent f1b0faf11b
commit f70eef7789
12 changed files with 66 additions and 64 deletions
+2
View File
@@ -205,6 +205,8 @@ class control extends baseControl
*/
public function executeHooks($methodName, $objectID)
{
if(!isset($this->config->bizVersion)) return false;
$flowFile = $this->app->getModuleRoot() . 'workflow/model.php';
$actionFile = $this->app->getModuleRoot() . 'workflowaction/model.php';
$hookFile = $this->app->getModuleRoot() . 'workflowhook/model.php';
+8 -8
View File
@@ -295,7 +295,7 @@ class bug extends control
$this->action->create('todo', $output['todoID'], 'finished', '', "BUG:$bugID");
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $bugID);
$this->executeHooks($this->methodName, $bugID);
if(defined('RUN_MODE') && RUN_MODE == 'api') $this->send(array('status' => 'success', 'data' => $bugID));
@@ -615,7 +615,7 @@ class bug extends control
if(defined('RUN_MODE') && RUN_MODE == 'api') $this->send(array('status' => 'success', 'data' => $bugID));
$bug = $this->bug->getById($bugID);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $bugID);
$this->executeHooks($this->methodName, $bugID);
if($bug->toTask != 0)
{
@@ -832,7 +832,7 @@ class bug extends control
$actionID = $this->action->create('bug', $bugID, 'Assigned', $this->post->comment, $this->post->assignedTo);
$this->action->logHistory($actionID, $changes);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $bugID);
$this->executeHooks($this->methodName, $bugID);
if(isonlybody()) die(js::closeModal('parent.parent'));
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
@@ -947,7 +947,7 @@ class bug extends control
$actionID = $this->action->create('bug', $bugID, 'bugConfirmed', $this->post->comment);
$this->action->logHistory($actionID, $changes);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $bugID);
$this->executeHooks($this->methodName, $bugID);
if(isonlybody()) die(js::closeModal('parent.parent'));
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
@@ -1005,7 +1005,7 @@ class bug extends control
$bug = $this->bug->getById($bugID);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $bugID);
$this->executeHooks($this->methodName, $bugID);
if($bug->toTask != 0)
{
@@ -1097,7 +1097,7 @@ class bug extends control
$actionID = $this->action->create('bug', $bugID, 'Activated', $this->post->comment);
$this->action->logHistory($actionID, $changes);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $bugID);
$this->executeHooks($this->methodName, $bugID);
if(isonlybody()) die(js::closeModal('parent.parent'));
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
@@ -1136,7 +1136,7 @@ class bug extends control
$actionID = $this->action->create('bug', $bugID, 'Closed', $this->post->comment);
$this->action->logHistory($actionID, $changes);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $bugID);
$this->executeHooks($this->methodName, $bugID);
if(isonlybody()) die(js::closeModal('parent.parent'));
if(defined('RUN_MODE') && RUN_MODE == 'api')
@@ -1304,7 +1304,7 @@ class bug extends control
$this->bug->delete(TABLE_BUG, $bugID);
if($bug->toTask != 0) echo js::alert($this->lang->bug->remindTask . $bug->toTask);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $bugID);
$this->executeHooks($this->methodName, $bugID);
die(js::locate($this->session->bugList, 'parent'));
}
+3 -3
View File
@@ -26,7 +26,7 @@ class build extends control
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('action')->create('build', $buildID, 'opened');
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $buildID);
$this->executeHooks($this->methodName, $buildID);
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadProjectBuilds($projectID)"));//Code for task #5126.
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('build', 'view', "buildID=$buildID")));
@@ -108,7 +108,7 @@ class build extends control
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $buildID);
$this->executeHooks($this->methodName, $buildID);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "buildID=$buildID")));
}
@@ -261,7 +261,7 @@ class build extends control
$build = $this->build->getById($buildID);
$this->build->delete(TABLE_BUILD, $buildID);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $buildID);
$this->executeHooks($this->methodName, $buildID);
/* if ajax request, send result. */
if($this->server->ajax)
+4 -4
View File
@@ -210,7 +210,7 @@ class product extends control
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('action')->create('product', $productID, 'opened');
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $productID);
$this->executeHooks($this->methodName, $productID);
$locate = $this->createLink($this->moduleName, 'browse', "productID=$productID");
if(isset($this->config->global->flow) and $this->config->global->flow == 'onlyTest') $locate = $this->createLink($this->moduleName, 'build', "productID=$productID");
@@ -260,7 +260,7 @@ class product extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $productID);
$this->executeHooks($this->methodName, $productID);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "product=$productID")));
}
@@ -360,7 +360,7 @@ class product extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $productID);
$this->executeHooks($this->methodName, $productID);
die(js::reload('parent.parent'));
}
@@ -428,7 +428,7 @@ class product extends control
$this->product->delete(TABLE_PRODUCT, $productID);
$this->dao->update(TABLE_DOCLIB)->set('deleted')->eq(1)->where('product')->eq($productID)->exec();
$this->session->set('product', ''); // 清除session。
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $productID);
$this->executeHooks($this->methodName, $productID);
die(js::locate($this->createLink('product', 'browse'), 'parent'));
}
}
+3 -3
View File
@@ -50,7 +50,7 @@ class productplan extends control
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('action')->create('productplan', $planID, 'opened');
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $planID);
$this->executeHooks($this->methodName, $planID);
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.$('a.refresh').click()}"));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('productplan', 'browse', "productID=$product&branch=$branch")));
@@ -99,7 +99,7 @@ class productplan extends control
$actionID = $this->loadModel('action')->create('productplan', $planID, 'edited');
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $planID);
$this->executeHooks($this->methodName, $planID);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "planID=$planID")));
}
@@ -166,7 +166,7 @@ class productplan extends control
$plan = $this->productplan->getById($planID);
$this->productplan->delete(TABLE_PRODUCTPLAN, $planID);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $planID);
$this->executeHooks($this->methodName, $planID);
/* if ajax request, send result. */
if($this->server->ajax)
+8 -8
View File
@@ -1055,7 +1055,7 @@ class project extends control
$this->loadModel('action')->create('project', $projectID, 'opened', '', join(',', $_POST['products']));
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $projectID);
$this->executeHooks($this->methodName, $projectID);
$planID = reset($_POST['plans']);
if(!empty($planID))
@@ -1124,7 +1124,7 @@ class project extends control
$actionID = $this->loadModel('action')->create('project', $projectID, 'edited');
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $projectID);
$this->executeHooks($this->methodName, $projectID);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "projectID=$projectID")));
}
@@ -1252,7 +1252,7 @@ class project extends control
$actionID = $this->action->create('project', $projectID, 'Started', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $projectID);
$this->executeHooks($this->methodName, $projectID);
die(js::reload('parent.parent'));
}
@@ -1287,7 +1287,7 @@ class project extends control
$actionID = $this->action->create('project', $projectID, 'Delayed', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $projectID);
$this->executeHooks($this->methodName, $projectID);
die(js::reload('parent.parent'));
}
@@ -1322,7 +1322,7 @@ class project extends control
$actionID = $this->action->create('project', $projectID, 'Suspended', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $projectID);
$this->executeHooks($this->methodName, $projectID);
die(js::reload('parent.parent'));
}
@@ -1357,7 +1357,7 @@ class project extends control
$actionID = $this->action->create('project', $projectID, 'Activated', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $projectID);
$this->executeHooks($this->methodName, $projectID);
die(js::reload('parent.parent'));
}
@@ -1399,7 +1399,7 @@ class project extends control
$actionID = $this->action->create('project', $projectID, 'Closed', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $projectID);
$this->executeHooks($this->methodName, $projectID);
die(js::reload('parent.parent'));
}
@@ -1708,7 +1708,7 @@ class project extends control
$this->project->delete(TABLE_PROJECT, $projectID);
$this->dao->update(TABLE_DOCLIB)->set('deleted')->eq(1)->where('project')->eq($projectID)->exec();
$this->session->set('project', '');
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $projectID);
$this->executeHooks($this->methodName, $projectID);
die(js::locate(inlink('index'), 'parent'));
}
}
+3 -3
View File
@@ -63,7 +63,7 @@ class release extends control
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('action')->create('release', $releaseID, 'opened');
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $releaseID);
$this->executeHooks($this->methodName, $releaseID);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID")));
}
@@ -103,7 +103,7 @@ class release extends control
$actionID = $this->loadModel('action')->create('release', $releaseID, 'Edited', $fileAction);
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $releaseID);
$this->executeHooks($this->methodName, $releaseID);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID")));
}
$this->loadModel('story');
@@ -200,7 +200,7 @@ class release extends control
$build = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq((int)$release->build)->fetch();
if(empty($build->project)) $this->loadModel('build')->delete(TABLE_BUILD, $build->id);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $releaseID);
$this->executeHooks($this->methodName, $releaseID);
/* if ajax request, send result. */
if($this->server->ajax)
+8 -8
View File
@@ -113,7 +113,7 @@ class story extends control
$this->action->create('todo', $todoID, 'finished', '', "STORY:$storyID");
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $storyID);
$this->executeHooks($this->methodName, $storyID);
if($this->post->newStory)
{
@@ -436,7 +436,7 @@ class story extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $storyID);
$this->executeHooks($this->methodName, $storyID);
if(defined('RUN_MODE') && RUN_MODE == 'api')
{
@@ -622,7 +622,7 @@ class story extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $storyID);
$this->executeHooks($this->methodName, $storyID);
die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
}
@@ -657,7 +657,7 @@ class story extends control
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->action->create('story', $storyID, 'Activated', $this->post->comment);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $storyID);
$this->executeHooks($this->methodName, $storyID);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
@@ -750,7 +750,7 @@ class story extends control
{
$this->story->delete(TABLE_STORY, $storyID);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $storyID);
$this->executeHooks($this->methodName, $storyID);
die(js::locate($this->session->storyList, 'parent'));
}
@@ -776,7 +776,7 @@ class story extends control
$this->action->create('story', $storyID, 'Closed', '', ucfirst($this->post->closedReason));
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $storyID);
$this->executeHooks($this->methodName, $storyID);
die(js::locate(inlink('view', "storyID=$storyID"), 'parent'));
}
@@ -847,7 +847,7 @@ class story extends control
$actionID = $this->action->create('story', $storyID, 'Closed', $this->post->comment, ucfirst($this->post->closedReason) . ($this->post->duplicateStory ? ':' . (int)$this->post->duplicateStory : ''));
$this->action->logHistory($actionID, $changes);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $storyID);
$this->executeHooks($this->methodName, $storyID);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
if(defined('RUN_MODE') && RUN_MODE == 'api')
@@ -1076,7 +1076,7 @@ class story extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $storyID);
$this->executeHooks($this->methodName, $storyID);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
+13 -13
View File
@@ -127,7 +127,7 @@ class task extends control
/* If link from no head then reload*/
if(isonlybody())
{
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
}
@@ -137,7 +137,7 @@ class task extends control
$this->action->create('todo', $todoID, 'finished', '', "TASK:$taskID");
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
/* Locate the browser. */
if($this->app->getViewType() == 'xhtml')
@@ -321,7 +321,7 @@ class task extends control
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if($task->fromBug != 0)
{
@@ -485,7 +485,7 @@ class task extends control
$actionID = $this->action->create('task', $taskID, 'Assigned', $this->post->comment, $this->post->assignedTo);
$this->action->logHistory($actionID, $changes);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
@@ -636,7 +636,7 @@ class task extends control
$this->dao->update(TABLE_TASK)->set('storyVersion')->eq($task->latestStoryVersion)->where('id')->eq($taskID)->exec();
$this->loadModel('action')->create('task', $taskID, 'confirmed', '', $task->latestStoryVersion);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
die(js::reload('parent'));
}
@@ -668,7 +668,7 @@ class task extends control
/* Remind whether to update status of the bug, if task which from that bug has been finished. */
$task = $this->task->getById($taskID);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if($changes and $this->task->needUpdateBugStatus($task))
{
@@ -820,7 +820,7 @@ class task extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if($this->task->needUpdateBugStatus($task))
{
@@ -899,7 +899,7 @@ class task extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
@@ -936,7 +936,7 @@ class task extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
@@ -971,7 +971,7 @@ class task extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
if(defined('RUN_MODE') && RUN_MODE == 'api')
@@ -1096,7 +1096,7 @@ class task extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
@@ -1132,7 +1132,7 @@ class task extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
@@ -1176,7 +1176,7 @@ class task extends control
}
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
die(js::locate($this->session->taskList, 'parent'));
}
+4 -4
View File
@@ -238,7 +238,7 @@ class testcase extends control
$this->loadModel('action');
$this->action->create('case', $caseID, 'Opened');
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $caseID);
$this->executeHooks($this->methodName, $caseID);
/* If link from no head then reload. */
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true));
@@ -567,7 +567,7 @@ class testcase extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $caseID);
$this->executeHooks($this->methodName, $caseID);
die(js::locate($this->createLink('testcase', 'view', "caseID=$caseID"), 'parent'));
}
@@ -779,7 +779,7 @@ class testcase extends control
$result = $this->post->result;
$this->loadModel('action')->create('case', $caseID, 'Reviewed', $this->post->comment, ucfirst($result));
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $caseID);
$this->executeHooks($this->methodName, $caseID);
die(js::reload('parent.parent'));
}
@@ -825,7 +825,7 @@ class testcase extends control
{
$this->testcase->delete(TABLE_CASE, $caseID);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $caseID);
$this->executeHooks($this->methodName, $caseID);
/* if ajax request, send result. */
if($this->server->ajax)
+3 -3
View File
@@ -89,7 +89,7 @@ class testsuite extends control
}
$actionID = $this->loadModel('action')->create('testsuite', $suiteID, 'opened');
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $suiteID);
$this->executeHooks($this->methodName, $suiteID);
$response['locate'] = $this->createLink('testsuite', 'browse', "productID=$productID");
$response['message'] = $this->lang->testsuite->successSaved;
@@ -188,7 +188,7 @@ class testsuite extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $suiteID);
$this->executeHooks($this->methodName, $suiteID);
$method = $suite->type == 'library' ? 'libView' : 'view';
$response['locate'] = inlink($method, "suiteID=$suiteID");
@@ -250,7 +250,7 @@ class testsuite extends control
$this->testsuite->delete($suiteID);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $suiteID);
$this->executeHooks($this->methodName, $suiteID);
/* if ajax request, send result. */
if($this->server->ajax)
+7 -7
View File
@@ -106,7 +106,7 @@ class testtask extends control
if(dao::isError()) die(js::error(dao::getError()));
$this->loadModel('action')->create('testtask', $taskID, 'opened');
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
die(js::locate($this->createLink('testtask', 'browse', "productID=$productID"), 'parent'));
}
@@ -462,7 +462,7 @@ class testtask extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
die(js::locate(inlink('view', "taskID=$taskID"), 'parent'));
}
@@ -510,7 +510,7 @@ class testtask extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID")));
@@ -553,7 +553,7 @@ class testtask extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID")));
@@ -596,7 +596,7 @@ class testtask extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->success, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID")));
@@ -641,7 +641,7 @@ class testtask extends control
$this->action->logHistory($actionID, $changes);
}
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID")));
@@ -681,7 +681,7 @@ class testtask extends control
$task = $this->testtask->getByID($taskID);
$this->testtask->delete(TABLE_TESTTASK, $taskID);
if(isset($this->config->bizVersion)) $this->executeHooks($this->methodName, $taskID);
$this->executeHooks($this->methodName, $taskID);
/* if ajax request, send result. */
if($this->server->ajax)