Commit 310f885c2a49fe5fcaf9d8b0cc3dbaa35d534807
1 parent
f03e5e0f
Comment updates
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@194 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
1 deletions
lib/foldermanagement/FolderManagemer.inc
| ... | ... | @@ -28,6 +28,7 @@ class FolderManager { |
| 28 | 28 | */ |
| 29 | 29 | function insertFolder($sName, $sDescription, $iParentID, $iCreatorID, $iDocumentTypeID, $iUnitID, $bIsPublic = false) { |
| 30 | 30 | global $default, $lang_err_database; |
| 31 | + //if the folder doesn't exist | |
| 31 | 32 | if (!(FolderNamager::folderExistsName($sName, $iParentID)) { |
| 32 | 33 | $sql = new Owl_DB(); |
| 33 | 34 | $result = $sql->query("INSERT INTO " . $default->owl_folders_table . " (name, description, parent_id, creator_id, document_type_id, unit_id, is_public) " . |
| ... | ... | @@ -51,7 +52,8 @@ class FolderManager { |
| 51 | 52 | * @return true on successfuly deletion, false otherwise and set $_SESSION["errorMessage"] |
| 52 | 53 | */ |
| 53 | 54 | function deleteFolder($iFolderID) { |
| 54 | - global $default, | |
| 55 | + global $default,$lang_err_folder_not_exist; | |
| 56 | + //if the folder exists | |
| 55 | 57 | if (folderExistsID($iFolderID)) { |
| 56 | 58 | $sql = new Owl_DB(); |
| 57 | 59 | $result = $sql->query("DELETE FROM " . $default->owl_folders_table . " WHERE id = " . $iFolderID); | ... | ... |