From bdd5f2413c44d686b4605fc2ae49725cbfff4e2a Mon Sep 17 00:00:00 2001 From: Conrad Vermeulen Date: Mon, 7 Jan 2008 11:53:28 +0000 Subject: [PATCH] WSA-93 "Add integration/oem no so that integrators may associate a custom document reference" Implemented. --- lib/documentmanagement/Document.inc | 21 ++++++++++++--------- lib/documentmanagement/documentcore.inc.php | 9 +++++++-- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/lib/documentmanagement/Document.inc b/lib/documentmanagement/Document.inc index ee629c3..b48a0c3 100644 --- a/lib/documentmanagement/Document.inc +++ b/lib/documentmanagement/Document.inc @@ -5,32 +5,32 @@ * KnowledgeTree Open Source Edition * Document Management Made Simple * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited - * + * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 3 as published by the * Free Software Foundation. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * + * * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. - * + * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU General Public License version 3. - * + * * In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the + * KnowledgeTree" logo and retain the original copyright notice. If the display of the * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original - * copyright notice. + * must display the words "Powered by KnowledgeTree" and retain the original + * copyright notice. * Contributor( s): ______________________________________ */ @@ -107,6 +107,8 @@ class Document { function getRestoreFolderPath() { return $this->_oDocumentCore->getRestoreFolderPath(); } function setRestoreFolderPath($sValue) { $this->_oDocumentCore->setRestoreFolderPath($sValue); } + function getOemNo() { return $this->_oDocumentCore->getOemNo(); } + // Document Metadata Items @@ -610,6 +612,7 @@ class Document { function clearAllCaches() { + $GLOBALS["_OBJECTCACHE"]['Document'] = array(); KTEntityUtil::clearAllCaches('KTDocumentCore'); KTEntityUtil::clearAllCaches('KTDocumentContentVersion'); KTEntityUtil::clearAllCaches('KTDocumentMetadataVersion'); diff --git a/lib/documentmanagement/documentcore.inc.php b/lib/documentmanagement/documentcore.inc.php index 9fea43d..c619387 100644 --- a/lib/documentmanagement/documentcore.inc.php +++ b/lib/documentmanagement/documentcore.inc.php @@ -82,6 +82,8 @@ class KTDocumentCore extends KTEntity { var $dCheckedOut; + var $sOemNo; + var $_aFieldToSelect = array( "iId" => "id", @@ -114,10 +116,11 @@ class KTDocumentCore extends KTEntity { 'iRestoreFolderId' => 'restore_folder_id', 'sRestoreFolderPath' => 'restore_folder_path', - 'dCheckedOut'=>'checkedout' + 'dCheckedOut'=>'checkedout', + 'sOemNo'=>'oem_no' ); - function KTDocument() { + function KTDocumentCore() { } // {{{ getters/setters @@ -133,6 +136,8 @@ class KTDocumentCore extends KTEntity { function getCheckedOutDate() { return $this->dCheckedOut; } function setCheckedOutDate($dNewValue) { $this->dCheckedOut = $dNewValue; } + function getOemNo() { return $this->sOemNo; } + function getFolderId() { return $this->iFolderId; } function setFolderId($iNewValue) { $this->iFolderId = $iNewValue; } -- libgit2 0.21.4