diff --git a/composer-dist.json b/composer-dist.json index 450c89a6f..10fe5da3c 100644 --- a/composer-dist.json +++ b/composer-dist.json @@ -17,6 +17,7 @@ "pear/db": "*", "alecrabbit/php-console-colour": "*", "dragonmantank/cron-expression": "^2.2", - "zf1/zend-search-lucene": "*" + "zf1/zend-search-lucene": "*", + "symfony/http-foundation": "^5.4" } } diff --git a/inc/inc.ClassControllerCommon.php b/inc/inc.ClassControllerCommon.php index 93ce0597f..c1542f9c2 100644 --- a/inc/inc.ClassControllerCommon.php +++ b/inc/inc.ClassControllerCommon.php @@ -54,17 +54,18 @@ class SeedDMS_Controller_Common { * @return mixed return value of called method */ function __invoke($get=array()) { - $this->callHook('preRun', isset($get['action']) ? $get['action'] : 'run'); - if(isset($get['action']) && $get['action']) { - if(method_exists($this, $get['action'])) { - return $this->{$get['action']}(); - } else { - echo "Missing action '".$get['action']."'"; - return false; - } - } else - return $this->run(); - $this->callHook('postRun', isset($get['action']) ? $get['action'] : 'run'); + if(!$this->callHook('preRun', get_class($this), isset($get['action']) ? $get['action'] : 'run', $get)) { + if(isset($get['action']) && $get['action']) { + if(method_exists($this, $get['action'])) { + return $this->{$get['action']}(); + } else { + echo "Missing action '".$get['action']."'"; + return false; + } + } else + return $this->run(); + } + $this->callHook('postRun', get_class($this), isset($get['action']) ? $get['action'] : 'run', $get); } function setParams($params) { diff --git a/op/op.RemoveDocument.php b/op/op.RemoveDocument.php index c53e6808d..becfcefc5 100644 --- a/op/op.RemoveDocument.php +++ b/op/op.RemoveDocument.php @@ -82,7 +82,7 @@ $docname = $document->getName(); $controller->setParam('document', $document); $controller->setParam('fulltextservice', $fulltextservice); -if(!$controller->run()) { +if(!$controller($_POST)) { if ($controller->getErrorMsg() != '') $errormsg = $controller->getErrorMsg(); else