* Optimize function executeHooks.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user