Commit d454e9de78f6640083fbb6639b156502aead99c7

Authored by Michael Joseph
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
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php
@@ -119,15 +119,20 @@ if (checkSession()) { @@ -119,15 +119,20 @@ if (checkSession()) {
119 //reset all the steps and email the document creator 119 //reset all the steps and email the document creator
120 Document::resetDocumentCollaborationSteps($fDocumentID); 120 Document::resetDocumentCollaborationSteps($fDocumentID);
121 $oDocument = Document::get($fDocumentID); 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 $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. "; 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 $oEmail = & new Email($default->owl_email_from, $default->owl_email_fromname); 132 $oEmail = & new Email($default->owl_email_from, $default->owl_email_fromname);
126 $oEmail->send($oUser->getEmail(), "Document collaboration complete", $sBody, $default->owl_email_from, $default->owl_email_fromname); 133 $oEmail->send($oUser->getEmail(), "Document collaboration complete", $sBody, $default->owl_email_from, $default->owl_email_fromname);
127 134
128 //possibly set the document up for web publishing???? 135 //possibly set the document up for web publishing????
129 -  
130 - $oDocument = Document::get($fDocumentID);  
131 $oPatternCustom = & new PatternCustom(); 136 $oPatternCustom = & new PatternCustom();
132 $oPatternCustom->setHtml(getEditPage($oDocument)); 137 $oPatternCustom->setHtml(getEditPage($oDocument));
133 $main->setCentralPayload($oPatternCustom); 138 $main->setCentralPayload($oPatternCustom);