Commit d454e9de78f6640083fbb6639b156502aead99c7
1 parent
6967784b
when collaboration is done- trigger major revision
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1384 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
9 additions
and
4 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php
| ... | ... | @@ -119,15 +119,20 @@ if (checkSession()) { |
| 119 | 119 | //reset all the steps and email the document creator |
| 120 | 120 | Document::resetDocumentCollaborationSteps($fDocumentID); |
| 121 | 121 | $oDocument = Document::get($fDocumentID); |
| 122 | - | |
| 123 | - $oUser = User::get($oDocument->getCreatorID()); | |
| 122 | + | |
| 123 | + // on the last collaboration step- trigger a major revision | |
| 124 | + // major version number rollover | |
| 125 | + $oDocument->setMajorVersionNumber($oDocument->getMajorVersionNumber()+1); | |
| 126 | + // reset minor version number | |
| 127 | + $oDocument->setMinorVersionNumber(0); | |
| 128 | + $oDocument->update(); | |
| 129 | + | |
| 130 | + $oUser = User::get($oDocument->getCreatorID()); | |
| 124 | 131 | $sBody = $oUser->getUserName() . ", the collaboration process for the document, '<a href=\"https://" . $_SERVER["SERVER_NAME"] . "$default->rootUrl/control.php?action=viewDocument&fDocumentID=" . $oDocument->getID() . "\">" . $oDocument->getName() . "</a>', has been completed. "; |
| 125 | 132 | $oEmail = & new Email($default->owl_email_from, $default->owl_email_fromname); |
| 126 | 133 | $oEmail->send($oUser->getEmail(), "Document collaboration complete", $sBody, $default->owl_email_from, $default->owl_email_fromname); |
| 127 | 134 | |
| 128 | 135 | //possibly set the document up for web publishing???? |
| 129 | - | |
| 130 | - $oDocument = Document::get($fDocumentID); | |
| 131 | 136 | $oPatternCustom = & new PatternCustom(); |
| 132 | 137 | $oPatternCustom->setHtml(getEditPage($oDocument)); |
| 133 | 138 | $main->setCentralPayload($oPatternCustom); | ... | ... |