Commit c93e1102de88b5bc4b96ca6483c6e28639f3f380
1 parent
4c8a1264
Implement performTransition action for this dispatcher.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3833 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
11 additions
and
0 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/documentWorkflow.php
| ... | ... | @@ -47,6 +47,7 @@ class DocumentWorkflowDispatcher extends KTStandardDispatcher { |
| 47 | 47 | $oWorkflow = KTWorkflowUtil::getWorkflowForDocument($oDocument); |
| 48 | 48 | $oWorkflowState = KTWorkflowUtil::getWorkflowStateForDocument($oDocument); |
| 49 | 49 | |
| 50 | + $oUser =& User::get($_SESSION['userID']); | |
| 50 | 51 | $aTransitions = KTWorkflowUtil::getTransitionsForDocumentUser($oDocument, $oUser); |
| 51 | 52 | $aWorkflows = KTWorkflow::getList(); |
| 52 | 53 | |
| ... | ... | @@ -68,6 +69,16 @@ class DocumentWorkflowDispatcher extends KTStandardDispatcher { |
| 68 | 69 | array('fDocumentID' => $oDocument->getID())); |
| 69 | 70 | exit(0); |
| 70 | 71 | } |
| 72 | + | |
| 73 | + function do_performTransition() { | |
| 74 | + $oDocument =& $this->oValidator->validateDocument($_REQUEST['fDocumentId']); | |
| 75 | + $oTransition =& $this->oValidator->validateWorkflowTransition($_REQUEST['fTransitionId']); | |
| 76 | + $sComments =& $this->oValidator->notEmpty($_REQUEST['fComments']); | |
| 77 | + $oUser =& User::get($_SESSION['userID']); | |
| 78 | + $res = KTWorkflowUtil::performTransitionOnDocument($oTransition, $oDocument, $oUser, $sComments); | |
| 79 | + $this->successRedirectToMain('Transition performed', | |
| 80 | + array('fDocumentID' => $oDocument->getID())); | |
| 81 | + } | |
| 71 | 82 | } |
| 72 | 83 | |
| 73 | 84 | $oDispatcher = new DocumentWorkflowDispatcher; | ... | ... |