From b04352b192f5150fdc38ded02f15c7cd28a3c951 Mon Sep 17 00:00:00 2001 From: rob Date: Fri, 7 Feb 2003 15:16:17 +0000 Subject: [PATCH] Added document collaboration check --- lib/foldermanagement/FolderCollaboration.inc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+), 0 deletions(-) diff --git a/lib/foldermanagement/FolderCollaboration.inc b/lib/foldermanagement/FolderCollaboration.inc index 5e95d17..ed6fcd4 100644 --- a/lib/foldermanagement/FolderCollaboration.inc +++ b/lib/foldermanagement/FolderCollaboration.inc @@ -137,6 +137,24 @@ class FolderCollaboration { } /** + * Checks whether there is a document which is currently + * going through this folder collaboration process + * + * return boolean true if there is a document currently going through this process, false otherwise + */ + function hasDocumentInProcess() { + global $default; + $sQuery = "SELECT FURL.id " . + "FROM groups_folders_approval_link AS GFAL INNER JOIN documents AS D ON GFAL.folder_id = D.folder_id " . + "INNER JOIN folders_users_roles_link AS FURL ON FURL.document_id = D.id " . + "WHERE GFAL.id = " . $this->iId; + $sql = $default->db; + $sql->query($sQuery); + return $sql->next_record(); + + } + + /** * Static function. * Given a web_documents primary key it will create a * FolderCollaboration object and populate it with the @@ -188,5 +206,7 @@ class FolderCollaboration { return false; } + + } ?> -- libgit2 0.21.4