Skip to content

Commit

Permalink
delete workflow method in cbupdater: fix PotentialForecast update
Browse files Browse the repository at this point in the history
  • Loading branch information
joebordes committed Jun 23, 2014
1 parent 6a8568a commit 916ac74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions build/changeSets/PotentialForecastAmount.php
Expand Up @@ -80,8 +80,7 @@ function undoChange() {
$wfrs = $adb->query("SELECT workflow_id FROM com_vtiger_workflows WHERE summary='Calculate or Update forecast amount'");
if ($wfrs and $adb->num_rows($wfrs)==1) {
$wfid = $adb->query_result($wfrs,0,0);
$workflowManager = new VTWorkflowManager($adb);
$workflowManager->delete($wfid);
$this->deleteWorkflow($wfid);
$this->sendMsg('Workflow deleted!');
}
$this->sendMsg('Changeset '.get_class($this).' undone!');
Expand Down
5 changes: 5 additions & 0 deletions modules/cbupdater/cbupdaterWorker.php
Expand Up @@ -166,6 +166,11 @@ function ExecuteQuery($query,$params=array()) {
}
}

function deleteWorkflow($wfid) {
$this->ExecuteQuery("DELETE FROM com_vtiger_workflowtasks WHERE workflow_id=?",array($wfid));
$this->ExecuteQuery("DELETE FROM com_vtiger_workflows WHERE workflow_id=?", array($wfid));
}

function installManifestModule($module) {
$package = new Vtiger_Package();
ob_start();
Expand Down

0 comments on commit 916ac74

Please sign in to comment.