* Add function to execute extension.

This commit is contained in:
liugang
2019-07-22 16:36:53 +08:00
parent b17d7c2999
commit c8958a5581
12 changed files with 85 additions and 64 deletions
+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->loadModel('workflowResult')->execute($this->moduleName, $this->methodName, $this->testcase->getById($caseID));
if(isset($this->config->bizVersion)) $this->executeExtension($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->loadModel('workflowResult')->execute($this->moduleName, $this->methodName, $this->testcase->getById($caseID));
if(isset($this->config->bizVersion)) $this->executeExtension($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->loadModel('workflowResult')->execute($this->moduleName, $this->methodName, $this->testcase->getById($caseID));
if(isset($this->config->bizVersion)) $this->executeExtension($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->loadModel('workflowResult')->execute($this->moduleName, $this->methodName, $this->testcase->getById($caseID));
if(isset($this->config->bizVersion)) $this->executeExtension($this->methodName, $caseID);
/* if ajax request, send result. */
if($this->server->ajax)