Commit 0fad826d7caf98df9314728028bcaf802d9d766b
1 parent
1f070e1e
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
Showing
2 changed files
with
9 additions
and
7 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/collaborationRollbackBL.php
| ... | ... | @@ -17,6 +17,7 @@ require_once("$default->fileSystemRoot/lib/users/User.inc"); |
| 17 | 17 | require_once("$default->fileSystemRoot/lib/documentmanagement/PhysicalDocumentManager.inc"); |
| 18 | 18 | require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTransaction.inc"); |
| 19 | 19 | require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); |
| 20 | +require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentCollaboration.inc"); | |
| 20 | 21 | |
| 21 | 22 | require_once("$default->fileSystemRoot/lib/foldermanagement/FolderCollaboration.inc"); |
| 22 | 23 | require_once("$default->fileSystemRoot/lib/foldermanagement/FolderUserRole.inc"); |
| ... | ... | @@ -29,13 +30,13 @@ require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/fo |
| 29 | 30 | |
| 30 | 31 | if (checkSession()) { |
| 31 | 32 | if (isset($fDocumentID)) { |
| 32 | - if (Document::userIsPerformingCurrentCollaborationStep($fDocumentID)) { | |
| 33 | + if (DocumentCollaboration::userIsPerformingCurrentCollaborationStep($fDocumentID)) { | |
| 33 | 34 | if (isset($fForStore)) { |
| 34 | 35 | //user has entered a comment |
| 35 | 36 | //create the transaction and rollback the step |
| 36 | 37 | $oDocumentTransaction = & new DocumentTransaction($fDocumentID, $fComment, COLLAB_ROLLBACK); |
| 37 | 38 | if ($oDocumentTransaction->create()) { |
| 38 | - Document::rollbackCollaborationStep($fDocumentID, $fComment); | |
| 39 | + DocumentCollaboration::rollbackCollaborationStep($fDocumentID, $fComment); | |
| 39 | 40 | redirect("$default->rootUrl/control.php?action=viewDocument&fDocumentID=$fDocumentID"); |
| 40 | 41 | } else { |
| 41 | 42 | $oDocument = Document::get($fDocumentID); | ... | ... |
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php
| ... | ... | @@ -31,6 +31,7 @@ require_once("$default->fileSystemRoot/lib/users/User.inc"); |
| 31 | 31 | require_once("$default->fileSystemRoot/lib/documentmanagement/PhysicalDocumentManager.inc"); |
| 32 | 32 | require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTransaction.inc"); |
| 33 | 33 | require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); |
| 34 | +require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentCollaboration.inc"); | |
| 34 | 35 | |
| 35 | 36 | require_once("$default->fileSystemRoot/lib/foldermanagement/FolderCollaboration.inc"); |
| 36 | 37 | require_once("$default->fileSystemRoot/lib/foldermanagement/FolderUserRole.inc"); |
| ... | ... | @@ -98,7 +99,7 @@ if (checkSession()) { |
| 98 | 99 | //if all the roles have been assigned we can start the collaboration process |
| 99 | 100 | |
| 100 | 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 | 104 | $oDocument->beginCollaborationProcess(); |
| 104 | 105 | $oPatternCustom = & new PatternCustom(); |
| ... | ... | @@ -124,9 +125,9 @@ if (checkSession()) { |
| 124 | 125 | $main->setErrorMessage("The collaboration steps for the folder must be set up before collaboration can begin"); |
| 125 | 126 | $main->render(); |
| 126 | 127 | } |
| 127 | - } else if ((isset($fCollaborationStepComplete)) && (Document::userIsPerformingCurrentCollaborationStep($fDocumentID))) { | |
| 128 | + } else if ((isset($fCollaborationStepComplete)) && (DocumentCollaboration::userIsPerformingCurrentCollaborationStep($fDocumentID))) { | |
| 128 | 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 | 131 | require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); |
| 131 | 132 | //the last step in the collaboration process has been performed- email the document creator |
| 132 | 133 | |
| ... | ... | @@ -156,7 +157,7 @@ if (checkSession()) { |
| 156 | 157 | } else { |
| 157 | 158 | require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); |
| 158 | 159 | //start the next steps if all criteria are met |
| 159 | - Document::beginNextStepInCollaborationProcess($fDocumentID, $_SESSION["userID"]); | |
| 160 | + DocumentCollaboration::beginNextStepInCollaborationProcess($fDocumentID, $_SESSION["userID"]); | |
| 160 | 161 | $oDocument = Document::get($fDocumentID); |
| 161 | 162 | $oPatternCustom = & new PatternCustom(); |
| 162 | 163 | $oPatternCustom->setHtml(getEditPage($oDocument)); |
| ... | ... | @@ -164,7 +165,7 @@ if (checkSession()) { |
| 164 | 165 | $main->setErrorMessage("The next steps in the collaboration process have been started"); |
| 165 | 166 | $main->render(); |
| 166 | 167 | } |
| 167 | - } else if ((isset($fForPublish)) && (!Document::documentIsPendingWebPublishing($fDocumentID))) { | |
| 168 | + } else if ((isset($fForPublish)) && (!DocumentCollaboration::documentIsPendingWebPublishing($fDocumentID))) { | |
| 168 | 169 | if (isset($fWebSiteID)) { |
| 169 | 170 | // user wishes to publish document |
| 170 | 171 | $oDocument = Document::get($fDocumentID); | ... | ... |