From 7343108914e4fcd2913e64c3d9175e9e100e7b9f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 14 May 2020 19:05:01 +0200 Subject: [PATCH] add new callback onChangeStatusDocumentContent --- SeedDMS_Core/Core/inc.ClassDocument.php | 8 +++++++ SeedDMS_Core/package.xml | 30 +++++++++++++++++++------ 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index ca597e216..8f1338fe3 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -3122,6 +3122,14 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($res) && !$res) return false; + /* Check if 'onUpdateStatusDocumentContent' callback is set */ + if(isset($this->_dms->callbacks['onChangeStatusDocumentContent'])) { + foreach($this->_dms->callbacks['onChangeStatusDocumentContent'] as $callback) { + if(($ret = call_user_func($callback[0], $callback[1], $this, $this->_status["status"], $status)) > 0) { + } + } + } + unset($this->_status); return true; } /* }}} */ diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 80adc0489..08fdea53a 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -12,11 +12,11 @@ uwe@steinmann.cx yes - 2020-04-14 + 2020-05-14 - 5.1.16 - 5.1.16 + 5.1.17 + 5.1.17 stable @@ -24,10 +24,7 @@ GPL License -- fix call of hooks in SeedDMS_Core -- add variable lasterror in SeedDMS_Core_DMS which can be set by hooks to pass an - error msg to the calling application -- better error checking in SeedDMS_Core_Document::addDocumentFile() +- add new callback onChangeStatusDocumentContent @@ -1747,5 +1744,24 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp() - no changes, just keep same version as seeddms application + + 2020-04-14 + + + 5.1.16 + 5.1.16 + + + stable + stable + + GPL License + +- fix call of hooks in SeedDMS_Core +- add variable lasterror in SeedDMS_Core_DMS which can be set by hooks to pass an + error msg to the calling application +- better error checking in SeedDMS_Core_Document::addDocumentFile() + +