mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +00:00
return error if postAddDocument fails
This commit is contained in:
parent
e91dd1c09c
commit
a3d92f5b72
|
@ -133,7 +133,7 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common {
|
||||||
if($document->getGroupAccessMode($notgroup) >= M_READ)
|
if($document->getGroupAccessMode($notgroup) >= M_READ)
|
||||||
$res = $document->addNotify($notgroup->getID(), false);
|
$res = $document->addNotify($notgroup->getID(), false);
|
||||||
}
|
}
|
||||||
} elseif($result === false) {
|
} elseif($document === false) {
|
||||||
if(empty($this->errormsg))
|
if(empty($this->errormsg))
|
||||||
$this->errormsg = 'hook_addDocument_failed';
|
$this->errormsg = 'hook_addDocument_failed';
|
||||||
return false;
|
return false;
|
||||||
|
@ -147,7 +147,10 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$this->callHook('postAddDocument', $document)) {
|
if(false ==== $this->callHook('postAddDocument', $document)) {
|
||||||
|
if(empty($this->errormsg))
|
||||||
|
$this->errormsg = 'hook_postAddDocument_failed';
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $document;
|
return $document;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user