mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
init $lasterror before calling hook
This commit is contained in:
parent
c6f85fc6e9
commit
c6924de065
|
@ -1987,6 +1987,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
* @return bool|mixed
|
||||
*/
|
||||
function removeContent($version) { /* {{{ */
|
||||
$this->_dms->lasterror = '';
|
||||
|
||||
/* Check if 'onPreRemoveDocument' callback is set */
|
||||
if(isset($this->_dms->callbacks['onPreRemoveContent'])) {
|
||||
foreach($this->_dms->callbacks['onPreRemoveContent'] as $callback) {
|
||||
|
@ -2272,6 +2274,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
*/
|
||||
function remove() { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
$this->_dms->lasterror = '';
|
||||
|
||||
/* Check if 'onPreRemoveDocument' callback is set */
|
||||
if(isset($this->_dms->callbacks['onPreRemoveDocument'])) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user