Commit 2c4e77582e87054d4c731a18cd7364570ae3aedc

Authored by Neil Blakey-Milner
1 parent fc0495c8

Add document immutable flag to the database (functionality to follow)


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5517 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/documentmanagement/Document.inc
... ... @@ -90,6 +90,9 @@ class Document {
90 90  
91 91 function getModifiedUserId() { return $this->_oDocumentCore->getModifiedUserId(); }
92 92 function setModifiedUserId($iNewValue) { $this->_oDocumentCore->setModifiedUserId($iNewValue); }
  93 +
  94 + function getImmutable() { return $this->_oDocumentCore->getImmutable(); }
  95 + function setImmutable($mValue) { $this->_oDocumentCore->setImmutable($mValue); }
93 96  
94 97 // Document Metadata Items
95 98  
... ...
lib/documentmanagement/documentcore.inc.php
... ... @@ -89,6 +89,7 @@ class KTDocumentCore extends KTEntity {
89 89 "iStatusId" => 'status_id',
90 90 "bIsCheckedOut" => 'is_checked_out',
91 91 "iCheckedOutUserId" => 'checked_out_user_id',
  92 + "bImmutable" => 'immutable',
92 93  
93 94 // permission-related
94 95 "iPermissionObjectId" => 'permission_object_id',
... ... @@ -132,6 +133,9 @@ class KTDocumentCore extends KTEntity {
132 133 function setMetadataVersion($iNewValue) { $this->iMetadataVersion = $iNewValue; }
133 134  
134 135 function getFullPath() { return $this->sFullPath; }
  136 +
  137 + function getImmutable() { return $this->bImmutable; }
  138 + function setImmutable($mValue) { $this->bImmutable = $mValue; }
135 139 // }}}
136 140  
137 141 // {{{ getParentId
... ... @@ -217,6 +221,9 @@ class KTDocumentCore extends KTEntity {
217 221 if (empty($this->bIsCheckedOut)) {
218 222 $this->bIsCheckedOut = false;
219 223 }
  224 + if (empty($this->bImmutable)) {
  225 + $this->bImmutable = false;
  226 + }
220 227 $oFolder = Folder::get($this->getFolderId());
221 228 $this->iPermissionObjectId = $oFolder->getPermissionObjectId();
222 229 $res = parent::create();
... ...
sql/mysql/upgrade/3.0.3.1/document_immutable.sql 0 → 100644
  1 +ALTER TABLE `documents` ADD `immutable` TINYINT( 1 ) NOT NULL DEFAULT '0';
... ...