//remove entry from eztrigger table also, if it exists there. eZTrigger::removeTriggerForWorkflow($workflowID); // if there is only one group which the workflow belongs to, delete (=disable) it: eZWorkflow::setIsEnabled(false, $workflowID); } else { // if there is more than 1 group, remove only from the group: eZWorkflowFunctions::removeGroup($workflowID, 0, array($groupID)); } } else { // just for sure :-) eZWorkflow::setIsEnabled(false, $workflowID); } } } else { // if there is no CurrentGroupID variable, disable every group in variable Workflow_id_checked: eZWorkflow::setIsEnabled(false, $http->postVariable('Workflow_id_checked')); } } if ($http->hasPostVariable('DeleteButton') and $http->hasPostVariable('Temp_Workflow_id_checked')) { $checkedIDs = $http->postVariable('Temp_Workflow_id_checked'); foreach ($checkedIDs as $checkedID) { eZWorkflow::removeWorkflow($checkedID, 1); eZWorkflowGroupLink::removeWorkflowMembers($checkedID, 1); } } /*$workflows = eZWorkflow::fetchList(); $workflowList = array(); foreach( array_keys( $workflows ) as $workflowID ) { $workflow = $workflows[$workflowID]; $workflowList[$workflow->attribute( 'id' )] = $workflow;