Commit 01a0a4c573e562c5405a3765606956f0cf42cbd3

Authored by Brad Shuttleworth
1 parent 6a8478ab

fix for KTS-540: document details should not be controllable by workflow.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5705 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktcore/admin/workflows.php
... ... @@ -564,11 +564,19 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
564 564  
565 565 $aInfo = $this->buildWorkflowInfo($oWorkflow);
566 566  
  567 + $aActionsOrig = $aInfo['actions'];
  568 + $aActions = array();
  569 + foreach ($aActionsOrig as $oAction) {
  570 + if ($oAction->getName() != 'ktcore.actions.document.displaydetails') {
  571 + $aActions[] = $oAction;
  572 + }
  573 + }
  574 +
567 575 $oTemplate->setData(array(
568 576 'context' => $this,
569 577 'oWorkflow' => $oWorkflow,
570 578  
571   - 'aActions' => $aInfo['actions'],
  579 + 'aActions' => $aActions,
572 580 'aActionsSelected' => $aInfo['controlled_actions'],
573 581  
574 582 // info
... ... @@ -856,6 +864,14 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
856 864  
857 865  
858 866 $this->getPermissionAssignmentsForState($oState);
  867 + $aActionOrig = KTDocumentActionUtil::getDocumentActionsByNames(KTWorkflowUtil::getControlledActionsForWorkflow($oWorkflow));
  868 + $aActions = array();
  869 + foreach ($aActionOrig as $k => $oAction) {
  870 + if ($oAction->getName() == 'ktcore.actions.document.displaydetails') {
  871 + continue;
  872 + }
  873 + $aActions[] = $oAction;
  874 + }
859 875  
860 876 $oTemplate->setData(array(
861 877 'context' => $this,
... ... @@ -865,7 +881,7 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
865 881 'aTransitionsTo' => $aTransitionsTo,
866 882 'aTransitions' => $aTransitions,
867 883 'aTransitionsSelected' => $aTransitionsSelected,
868   - 'aActions' => KTDocumentActionUtil::getDocumentActionsByNames(KTWorkflowUtil::getControlledActionsForWorkflow($oWorkflow)),
  884 + 'aActions' => $aActions,
869 885 'aActionsSelected' => KTWorkflowUtil::getEnabledActionsForState($oState),
870 886 'aGroups' => Group::getList(),
871 887 'aRoles' => Role::getList('id NOT IN (-3,-4)'),
... ...