Commit f45549487032664f392110958f410e50c63fd10d

Authored by rob
1 parent 3fb68e83

Updated so that when editing document routing - if no user is selected,

default user is filled in


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2060 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/collaborationBL.php
@@ -85,7 +85,7 @@ if (checkSession()) { @@ -85,7 +85,7 @@ if (checkSession()) {
85 //go back to the document view page 85 //go back to the document view page
86 redirect("$default->rootUrl/control.php?action=viewDocument&fDocumentID=$fDocumentID"); 86 redirect("$default->rootUrl/control.php?action=viewDocument&fDocumentID=$fDocumentID");
87 } else { 87 } else {
88 - //the may have been unassigned and no new user assigned 88 + //the user may have been unassigned and no new user assigned
89 //if this is true, delete the folder_user_role_link 89 //if this is true, delete the folder_user_role_link
90 $oFolderUserRole = & FolderUserRole::getFromFolderCollaboration($fFolderCollaborationID, $fDocumentID); 90 $oFolderUserRole = & FolderUserRole::getFromFolderCollaboration($fFolderCollaborationID, $fDocumentID);
91 if (!($oFolderUserRole === false)) { 91 if (!($oFolderUserRole === false)) {
@@ -127,9 +127,10 @@ if (checkSession()) { @@ -127,9 +127,10 @@ if (checkSession()) {
127 127
128 function getFolderCollaborationArray($fFolderCollaborationID, $fDocumentID) { 128 function getFolderCollaborationArray($fFolderCollaborationID, $fDocumentID) {
129 global $default; 129 global $default;
130 - $sQuery = "SELECT GFL.group_id AS group_id, GFL.folder_id AS folder_id, GFL.precedence AS precedence, GFL.role_id, U.id AS user_id " . 130 + $sQuery = "SELECT GFL.group_id AS group_id, GFL.folder_id AS folder_id, GFL.precedence AS precedence, GFL.role_id, COALESCE(U.id, U2.id) AS user_id " .
131 "FROM $default->owl_groups_folders_approval_table AS GFL LEFT OUTER JOIN folders_users_roles_link AS FURL ON FURL.group_folder_approval_id = GFL.id AND FURL.document_id = $fDocumentID " . 131 "FROM $default->owl_groups_folders_approval_table AS GFL LEFT OUTER JOIN folders_users_roles_link AS FURL ON FURL.group_folder_approval_id = GFL.id AND FURL.document_id = $fDocumentID " .
132 "LEFT OUTER JOIN users AS U ON FURL.user_id = U.id " . 132 "LEFT OUTER JOIN users AS U ON FURL.user_id = U.id " .
  133 + "LEFT OUTER JOIN users AS U2 ON GFL.user_id = U2.id " .
133 "WHERE GFL.id = $fFolderCollaborationID"; 134 "WHERE GFL.id = $fFolderCollaborationID";
134 $sql = $default->db; 135 $sql = $default->db;
135 $sql->query($sQuery); 136 $sql->query($sQuery);