Commit 668fa73cf7d403bf4cc4c8be2056e1a0fc13cc1c

Authored by michael
1 parent 31c7e9f6

(#2975) redirect to type specific edit page when document type changes


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2723 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyBL.php
@@ -62,6 +62,7 @@ if (checkSession()) { @@ -62,6 +62,7 @@ if (checkSession()) {
62 //get rid of all the old document type entries 62 //get rid of all the old document type entries
63 $oDocument->removeInvalidDocumentTypeEntries(); 63 $oDocument->removeInvalidDocumentTypeEntries();
64 $oDocument->setDocumentTypeID($fDocumentTypeID); 64 $oDocument->setDocumentTypeID($fDocumentTypeID);
  65 + $bUpdateMetaData = true;
65 } 66 }
66 67
67 if ($oDocument->update()) { 68 if ($oDocument->update()) {
@@ -73,8 +74,8 @@ if (checkSession()) { @@ -73,8 +74,8 @@ if (checkSession()) {
73 $default->log->info("modifyBL.php fired $count subscription alerts for modified document " . $oDocument->getName()); 74 $default->log->info("modifyBL.php fired $count subscription alerts for modified document " . $oDocument->getName());
74 75
75 //on successful update, redirect to the view page 76 //on successful update, redirect to the view page
76 - if (isset($fFirstEdit)) {  
77 - controllerRedirect("modifyDocumentGenericMetaData", "fDocumentID=" . $oDocument->getID() . "&fFirstEdit=1"); 77 + if (isset($bUpdateMetaData)) {
  78 + controllerRedirect("modifyDocumentTypeMetaData", "fDocumentID=" . $oDocument->getID() . "&fFirstEdit=1");
78 } else { 79 } else {
79 controllerRedirect("viewDocument", "fDocumentID=" . $oDocument->getID()); 80 controllerRedirect("viewDocument", "fDocumentID=" . $oDocument->getID());
80 } 81 }