Commit f99317f0b9f02d11469b959e8b3b90819f6cca11

Authored by rob
1 parent d5fe57f2

Added DocumentCollaboration.inc inclusion file and changes references

from Document.inc to DocumentCollaboration.inc


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1761 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/collaborationRollbackBL.php
@@ -17,6 +17,7 @@ require_once("$default->fileSystemRoot/lib/users/User.inc"); @@ -17,6 +17,7 @@ require_once("$default->fileSystemRoot/lib/users/User.inc");
17 require_once("$default->fileSystemRoot/lib/documentmanagement/PhysicalDocumentManager.inc"); 17 require_once("$default->fileSystemRoot/lib/documentmanagement/PhysicalDocumentManager.inc");
18 require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTransaction.inc"); 18 require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTransaction.inc");
19 require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); 19 require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc");
  20 +require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentCollaboration.inc");
20 21
21 require_once("$default->fileSystemRoot/lib/foldermanagement/FolderCollaboration.inc"); 22 require_once("$default->fileSystemRoot/lib/foldermanagement/FolderCollaboration.inc");
22 require_once("$default->fileSystemRoot/lib/foldermanagement/FolderUserRole.inc"); 23 require_once("$default->fileSystemRoot/lib/foldermanagement/FolderUserRole.inc");
@@ -29,13 +30,13 @@ require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/fo @@ -29,13 +30,13 @@ require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/fo
29 30
30 if (checkSession()) { 31 if (checkSession()) {
31 if (isset($fDocumentID)) { 32 if (isset($fDocumentID)) {
32 - if (Document::userIsPerformingCurrentCollaborationStep($fDocumentID)) { 33 + if (DocumentCollaboration::userIsPerformingCurrentCollaborationStep($fDocumentID)) {
33 if (isset($fForStore)) { 34 if (isset($fForStore)) {
34 //user has entered a comment 35 //user has entered a comment
35 //create the transaction and rollback the step 36 //create the transaction and rollback the step
36 $oDocumentTransaction = & new DocumentTransaction($fDocumentID, $fComment, COLLAB_ROLLBACK); 37 $oDocumentTransaction = & new DocumentTransaction($fDocumentID, $fComment, COLLAB_ROLLBACK);
37 if ($oDocumentTransaction->create()) { 38 if ($oDocumentTransaction->create()) {
38 - Document::rollbackCollaborationStep($fDocumentID, $fComment); 39 + DocumentCollaboration::rollbackCollaborationStep($fDocumentID, $fComment);
39 redirect("$default->rootUrl/control.php?action=viewDocument&fDocumentID=$fDocumentID"); 40 redirect("$default->rootUrl/control.php?action=viewDocument&fDocumentID=$fDocumentID");
40 } else { 41 } else {
41 $oDocument = Document::get($fDocumentID); 42 $oDocument = Document::get($fDocumentID);
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php
@@ -31,6 +31,7 @@ require_once("$default->fileSystemRoot/lib/users/User.inc"); @@ -31,6 +31,7 @@ require_once("$default->fileSystemRoot/lib/users/User.inc");
31 require_once("$default->fileSystemRoot/lib/documentmanagement/PhysicalDocumentManager.inc"); 31 require_once("$default->fileSystemRoot/lib/documentmanagement/PhysicalDocumentManager.inc");
32 require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTransaction.inc"); 32 require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTransaction.inc");
33 require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); 33 require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc");
  34 +require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentCollaboration.inc");
34 35
35 require_once("$default->fileSystemRoot/lib/foldermanagement/FolderCollaboration.inc"); 36 require_once("$default->fileSystemRoot/lib/foldermanagement/FolderCollaboration.inc");
36 require_once("$default->fileSystemRoot/lib/foldermanagement/FolderUserRole.inc"); 37 require_once("$default->fileSystemRoot/lib/foldermanagement/FolderUserRole.inc");
@@ -98,7 +99,7 @@ if (checkSession()) { @@ -98,7 +99,7 @@ if (checkSession()) {
98 //if all the roles have been assigned we can start the collaboration process 99 //if all the roles have been assigned we can start the collaboration process
99 100
100 //TODO: check if this collaboration has already occured, and then reset all the steps before beginning it again 101 //TODO: check if this collaboration has already occured, and then reset all the steps before beginning it again
101 - //Document::resetDocumentCollaborationSteps($fDocumentID); 102 + //DocumentCollaboration::resetDocumentCollaborationSteps($fDocumentID);
102 103
103 $oDocument->beginCollaborationProcess(); 104 $oDocument->beginCollaborationProcess();
104 $oPatternCustom = & new PatternCustom(); 105 $oPatternCustom = & new PatternCustom();
@@ -124,9 +125,9 @@ if (checkSession()) { @@ -124,9 +125,9 @@ if (checkSession()) {
124 $main->setErrorMessage("The collaboration steps for the folder must be set up before collaboration can begin"); 125 $main->setErrorMessage("The collaboration steps for the folder must be set up before collaboration can begin");
125 $main->render(); 126 $main->render();
126 } 127 }
127 - } else if ((isset($fCollaborationStepComplete)) && (Document::userIsPerformingCurrentCollaborationStep($fDocumentID))) { 128 + } else if ((isset($fCollaborationStepComplete)) && (DocumentCollaboration::userIsPerformingCurrentCollaborationStep($fDocumentID))) {
128 //the user has signled that they have completed their step in the collaboration process 129 //the user has signled that they have completed their step in the collaboration process
129 - if (Document::isLastStepInCollaborationProcess($fDocumentID)) { 130 + if (DocumentCollaboration::isLastStepInCollaborationProcess($fDocumentID)) {
130 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); 131 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc");
131 //the last step in the collaboration process has been performed- email the document creator 132 //the last step in the collaboration process has been performed- email the document creator
132 133
@@ -156,7 +157,7 @@ if (checkSession()) { @@ -156,7 +157,7 @@ if (checkSession()) {
156 } else { 157 } else {
157 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); 158 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc");
158 //start the next steps if all criteria are met 159 //start the next steps if all criteria are met
159 - Document::beginNextStepInCollaborationProcess($fDocumentID, $_SESSION["userID"]); 160 + DocumentCollaboration::beginNextStepInCollaborationProcess($fDocumentID, $_SESSION["userID"]);
160 $oDocument = Document::get($fDocumentID); 161 $oDocument = Document::get($fDocumentID);
161 $oPatternCustom = & new PatternCustom(); 162 $oPatternCustom = & new PatternCustom();
162 $oPatternCustom->setHtml(getEditPage($oDocument)); 163 $oPatternCustom->setHtml(getEditPage($oDocument));
@@ -164,7 +165,7 @@ if (checkSession()) { @@ -164,7 +165,7 @@ if (checkSession()) {
164 $main->setErrorMessage("The next steps in the collaboration process have been started"); 165 $main->setErrorMessage("The next steps in the collaboration process have been started");
165 $main->render(); 166 $main->render();
166 } 167 }
167 - } else if ((isset($fForPublish)) && (!Document::documentIsPendingWebPublishing($fDocumentID))) { 168 + } else if ((isset($fForPublish)) && (!DocumentCollaboration::documentIsPendingWebPublishing($fDocumentID))) {
168 if (isset($fWebSiteID)) { 169 if (isset($fWebSiteID)) {
169 // user wishes to publish document 170 // user wishes to publish document
170 $oDocument = Document::get($fDocumentID); 171 $oDocument = Document::get($fDocumentID);