add new callback onChangeStatusDocumentContent

This commit is contained in:
Uwe Steinmann 2020-05-14 19:05:01 +02:00
parent a2cd75d7f0
commit 7343108914
2 changed files with 31 additions and 7 deletions

View File

@ -3122,6 +3122,14 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
if (is_bool($res) && !$res) if (is_bool($res) && !$res)
return false; 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); unset($this->_status);
return true; return true;
} /* }}} */ } /* }}} */

View File

@ -12,11 +12,11 @@
<email>uwe@steinmann.cx</email> <email>uwe@steinmann.cx</email>
<active>yes</active> <active>yes</active>
</lead> </lead>
<date>2020-04-14</date> <date>2020-05-14</date>
<time>09:43:12</time> <time>09:43:12</time>
<version> <version>
<release>5.1.16</release> <release>5.1.17</release>
<api>5.1.16</api> <api>5.1.17</api>
</version> </version>
<stability> <stability>
<release>stable</release> <release>stable</release>
@ -24,10 +24,7 @@
</stability> </stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license> <license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes> <notes>
- fix call of hooks in SeedDMS_Core - add new callback onChangeStatusDocumentContent
- 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()
</notes> </notes>
<contents> <contents>
<dir baseinstalldir="SeedDMS" name="/"> <dir baseinstalldir="SeedDMS" name="/">
@ -1747,5 +1744,24 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
- no changes, just keep same version as seeddms application - no changes, just keep same version as seeddms application
</notes> </notes>
</release> </release>
<release>
<date>2020-04-14</date>
<time>09:43:12</time>
<version>
<release>5.1.16</release>
<api>5.1.16</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- 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()
</notes>
</release>
</changelog> </changelog>
</package> </package>