Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2022-07-26 14:33:23 +02:00
commit b8fd313e2d
3 changed files with 15 additions and 13 deletions

View File

@ -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"
}
}

View File

@ -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) {

View File

@ -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