do not pass name and comment to preAddDocument hook

This commit is contained in:
Uwe Steinmann 2017-10-12 15:40:09 +02:00
parent f6aa3bfc94
commit 7563ebdbf7

View File

@ -23,13 +23,17 @@
class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common { class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common {
public function run() { /* {{{ */ public function run() { /* {{{ */
$name = $this->getParam('name'); $dms = $this->params['dms'];
$comment = $this->getParam('comment'); $user = $this->params['user'];
$settings = $this->params['settings'];
$index = $this->params['index'];
$indexconf = $this->params['indexconf'];
$folder = $this->params['folder'];
/* Call preAddDocument early, because it might need to modify some /* Call preAddDocument early, because it might need to modify some
* of the parameters. * of the parameters.
*/ */
if(false === $this->callHook('preAddDocument', array('name'=>&$name, 'comment'=>&$comment))) { if(false === $this->callHook('preAddDocument')) {
if(empty($this->errormsg)) if(empty($this->errormsg))
$this->errormsg = 'hook_preAddDocument_failed'; $this->errormsg = 'hook_preAddDocument_failed';
return null; return null;
@ -37,13 +41,7 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common {
$name = $this->getParam('name'); $name = $this->getParam('name');
$comment = $this->getParam('comment'); $comment = $this->getParam('comment');
$dms = $this->params['dms'];
$user = $this->params['user'];
$settings = $this->params['settings'];
$documentsource = $this->params['documentsource']; $documentsource = $this->params['documentsource'];
$index = $this->params['index'];
$indexconf = $this->params['indexconf'];
$folder = $this->params['folder'];
$expires = $this->getParam('expires'); $expires = $this->getParam('expires');
$keywords = $this->getParam('keywords'); $keywords = $this->getParam('keywords');
$cats = $this->getParam('categories'); $cats = $this->getParam('categories');