Commit 4086a08d4e3d5e771e0d87de446cac7fc75a736a
1 parent
e1b0c106
Make DocumentTransation inherit from KTEntity (just the class, not
reimplement), and use clearCacheGroups when the entity is created/deleted git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5374 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
3 deletions
lib/documentmanagement/DocumentTransaction.inc
| ... | ... | @@ -36,7 +36,7 @@ require_once(KT_LIB_DIR . '/documentmanagement/DocumentTransactionType.inc.php') |
| 36 | 36 | require_once(KT_LIB_DIR . '/foldermanagement/Folder.inc'); |
| 37 | 37 | require_once(KT_LIB_DIR . '/browse/browseutil.inc.php'); |
| 38 | 38 | |
| 39 | -class DocumentTransaction { | |
| 39 | +class DocumentTransaction extends KTEntity { | |
| 40 | 40 | |
| 41 | 41 | /** primary key of document transaction */ |
| 42 | 42 | var $iId = -1; |
| ... | ... | @@ -146,6 +146,7 @@ class DocumentTransaction { |
| 146 | 146 | return false; |
| 147 | 147 | } |
| 148 | 148 | $this->iId = $id; |
| 149 | + $this->clearCachedGroups(); | |
| 149 | 150 | KTDocumentUtil::updateTransactionText($this->iDocumentID); |
| 150 | 151 | KTDocumentUtil::updateSearchableText($this->iDocumentID); |
| 151 | 152 | return true; |
| ... | ... | @@ -162,12 +163,11 @@ class DocumentTransaction { |
| 162 | 163 | $sql = $default->db; |
| 163 | 164 | $result = $sql->query("DELETE FROM " . $default->document_transactions_table . " WHERE id = " . $this->iId); |
| 164 | 165 | if ($result) { |
| 166 | + $this->clearCachedGroups(); | |
| 165 | 167 | $this->iId = -1; |
| 166 | 168 | return true; |
| 167 | 169 | } |
| 168 | 170 | $_SESSION["errorMessage"] = $lang_err_database; |
| 169 | - KTDocumentUtil::updateTransactionText($this->iDocumentID); | |
| 170 | - KTDocumentUtil::updateSearchableText($this->iDocumentID); | |
| 171 | 171 | return false; |
| 172 | 172 | } |
| 173 | 173 | $_SESSION["errorMessage"] = $lang_err_object_key; | ... | ... |