Commit abcae52c19061bc8fbc94e9373231d273209a3c5

Authored by nbm
1 parent 59358ab0

Remove unused function, and start using Id instead of ID


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4021 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/documentWorkflow.php
@@ -16,33 +16,12 @@ require_once(KT_LIB_DIR . "/validation/dispatchervalidation.inc.php"); @@ -16,33 +16,12 @@ require_once(KT_LIB_DIR . "/validation/dispatchervalidation.inc.php");
16 require_once(KT_LIB_DIR . '/workflow/workflow.inc.php'); 16 require_once(KT_LIB_DIR . '/workflow/workflow.inc.php');
17 require_once(KT_LIB_DIR . '/workflow/workflowutil.inc.php'); 17 require_once(KT_LIB_DIR . '/workflow/workflowutil.inc.php');
18 18
19 -function displayFolderPathLink($aPathArray, $aPathNameArray, $sLinkPage = "") {  
20 - global $default;  
21 - if (strlen($sLinkPage) == 0) {  
22 - $sLinkPage = $_SERVER["PHP_SELF"];  
23 - }  
24 - $default->log->debug("displayFolderPathLink: slinkPage=$sLinkPage");  
25 - // display a separate link to each folder in the path  
26 - for ($i=0; $i<count($aPathArray); $i++) {  
27 - $iFolderID = $aPathArray[$i];  
28 - // retrieve the folder name for this folder  
29 - $sFolderName = $aPathNameArray[$i];  
30 - // generate a link back to this page setting fFolderID  
31 - $sLink = generateLink($sLinkPage,  
32 - "fBrowseType=folder&fFolderID=$iFolderID",  
33 - $sFolderName);  
34 - $sPathLinks = (strlen($sPathLinks) > 0) ? $sPathLinks . " > " . $sLink : $sLink;  
35 - }  
36 - return $sPathLinks;  
37 -}  
38 -  
39 -  
40 class DocumentWorkflowDispatcher extends KTStandardDispatcher { 19 class DocumentWorkflowDispatcher extends KTStandardDispatcher {
41 var $bAutomaticTransaction = true; 20 var $bAutomaticTransaction = true;
42 21
43 function do_main() { 22 function do_main() {
44 $oTemplate =& $this->oValidator->validateTemplate("ktcore/workflow/documentWorkflow"); 23 $oTemplate =& $this->oValidator->validateTemplate("ktcore/workflow/documentWorkflow");
45 - $oDocument =& $this->oValidator->validateDocument($_REQUEST['fDocumentID']); 24 + $oDocument =& $this->oValidator->validateDocument($_REQUEST['fDocumentId']);
46 25
47 $oWorkflow = KTWorkflowUtil::getWorkflowForDocument($oDocument); 26 $oWorkflow = KTWorkflowUtil::getWorkflowForDocument($oDocument);
48 $oWorkflowState = KTWorkflowUtil::getWorkflowStateForDocument($oDocument); 27 $oWorkflowState = KTWorkflowUtil::getWorkflowStateForDocument($oDocument);
@@ -66,7 +45,7 @@ class DocumentWorkflowDispatcher extends KTStandardDispatcher { @@ -66,7 +45,7 @@ class DocumentWorkflowDispatcher extends KTStandardDispatcher {
66 $oWorkflow =& $this->oValidator->validateWorkflow($_REQUEST['fWorkflowId']); 45 $oWorkflow =& $this->oValidator->validateWorkflow($_REQUEST['fWorkflowId']);
67 $res = KTWorkflowUtil::startWorkflowOnDocument($oWorkflow, $oDocument); 46 $res = KTWorkflowUtil::startWorkflowOnDocument($oWorkflow, $oDocument);
68 $this->successRedirectToMain('Workflow started', 47 $this->successRedirectToMain('Workflow started',
69 - array('fDocumentID' => $oDocument->getID())); 48 + array('fDocumentId' => $oDocument->getId()));
70 exit(0); 49 exit(0);
71 } 50 }
72 51
@@ -77,7 +56,7 @@ class DocumentWorkflowDispatcher extends KTStandardDispatcher { @@ -77,7 +56,7 @@ class DocumentWorkflowDispatcher extends KTStandardDispatcher {
77 $oUser =& User::get($_SESSION['userID']); 56 $oUser =& User::get($_SESSION['userID']);
78 $res = KTWorkflowUtil::performTransitionOnDocument($oTransition, $oDocument, $oUser, $sComments); 57 $res = KTWorkflowUtil::performTransitionOnDocument($oTransition, $oDocument, $oUser, $sComments);
79 $this->successRedirectToMain('Transition performed', 58 $this->successRedirectToMain('Transition performed',
80 - array('fDocumentID' => $oDocument->getID())); 59 + array('fDocumentId' => $oDocument->getId()));
81 } 60 }
82 } 61 }
83 62