get name and comment after preAddDocument hook, set generic err msg only if hook hasn't set one

This commit is contained in:
Uwe Steinmann 2017-06-09 12:28:17 +02:00
parent 883131d61e
commit d64a662aed

View File

@ -30,10 +30,13 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common {
* of the parameters.
*/
if(false === $this->callHook('preAddDocument', array('name'=>&$name, 'comment'=>&$comment))) {
$this->errormsg = 'hook_preAddDocument_failed';
if(empty($this->errormsg))
$this->errormsg = 'hook_preAddDocument_failed';
return null;
}
$name = $this->getParam('name');
$comment = $this->getParam('comment');
$dms = $this->params['dms'];
$user = $this->params['user'];
$settings = $this->params['settings'];