From 095b4ff0fb554d039e4f9fff4a5e2f6a153a04cd Mon Sep 17 00:00:00 2001 From: rob Date: Fri, 17 Jan 2003 09:44:42 +0000 Subject: [PATCH] Added new get/set functions for folderID --- lib/documentmanagement/Document.inc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/documentmanagement/Document.inc b/lib/documentmanagement/Document.inc index a27420d..6b6b864 100644 --- a/lib/documentmanagement/Document.inc +++ b/lib/documentmanagement/Document.inc @@ -7,12 +7,10 @@ * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa * @date 15 January 2003 * -* @todo add in document change tracking functionality +* @todo add in document change transaction functionality * */ -require_once("$default->owl_fs_root/lib/foldermanagement/FolderLib.inc"); - class Document { /** primary key */ var $iId; @@ -52,7 +50,7 @@ class Document { * @param $iFolderID Primary key of folder to which document belongs * */ - function Document($sNewName, $sNewFileName, $iNewSize, $iNewCreatorID, $sNewDescription, $iNewMimeID, $iNewFolderID) { + function Document($sNewName, $sNewFileName, $iNewSize, $iNewCreatorID, $iNewMimeID, $iNewFolderID, $sNewDescription = "None") { $this->iId = -1; //primary key not set as document is not stored yet $this->sName = $sNewName; $this->iSize = $iNewSize; @@ -168,7 +166,7 @@ class Document { $doc->setIsCheckedOut($sql->f("is_checked_out")); return $doc; } - $_SESSION["errorMessage"] = $lang_err_object_not_exist . "id = " $iDocumentID . " table = documents"; + $_SESSION["errorMessage"] = $lang_err_object_not_exist . "id = " . $iDocumentID . " table = documents"; return false; } @@ -207,6 +205,16 @@ class Document { $this->sFileName = $sNewValue; } + /** get the primary key of the folder in which the document is stored */ + function getFolderID() { + return $this->iFolderID; + } + + /** set the primary key of the folder in which the document is stored */ + function setFolderID($iNewValue) { + $this->iFolderID = $iNewValue; + } + /** get the document file size in bytes */ function getFileSize() { return $this->iSize; -- libgit2 0.21.4