From 1b779360a532a4cc756cce51e52a011141911084 Mon Sep 17 00:00:00 2001 From: steinm Date: Thu, 8 Dec 2011 18:36:57 +0000 Subject: [PATCH] - added setMaxDirID() --- LetoDMS_Core/Core/inc.ClassDMS.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/LetoDMS_Core/Core/inc.ClassDMS.php b/LetoDMS_Core/Core/inc.ClassDMS.php index de144c0a0..f80c479f6 100644 --- a/LetoDMS_Core/Core/inc.ClassDMS.php +++ b/LetoDMS_Core/Core/inc.ClassDMS.php @@ -178,6 +178,7 @@ class LetoDMS_Core_DMS { else $this->contentDir = $contentDir.'/'; $this->rootFolderID = 1; + $this->maxDirID = 0; //31998; $this->enableAdminRevApp = false; $this->enableConverting = false; $this->convertFileTypes = array(); @@ -246,6 +247,26 @@ class LetoDMS_Core_DMS { $this->rootFolderID = $id; } /* }}} */ + /** + * Set maximum number of subdirectories per directory + * + * The value of maxDirID is quite crucial because, all documents are + * associated with a directory in the filesystem. Consequently, there is + * maximum number of documents, because depending on the file system + * the maximum number of subdirectories is limited. Since version 3.3.0 of + * letodms an additional directory level has been introduced. All documents + * from 1 to maxDirID-1 will be saved in 1/, documents from maxDirID + * to 2*maxDirID-1 are stored in 2/ and so on. + * + * This function must be called right after creating an instance of + * LetoDMS_Core_DMS + * + * @param interger $id id of root folder + */ + function setMaxDirID($id) { /* {{{ */ + $this->maxDirID = $id; + } /* }}} */ + /** * Get root folder *