mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
first check if parameter 'action' is set, return false if preRun fails
This commit is contained in:
parent
5378d6e7d9
commit
014bcc009d
|
@ -61,12 +61,14 @@ class SeedDMS_Controller_Common {
|
|||
*/
|
||||
public function __invoke($get=array()) {
|
||||
$action = null;
|
||||
$request = $this->getParam('request');
|
||||
if($request) {
|
||||
if($request->isMethod('get'))
|
||||
$action = $request->query->get('action');
|
||||
elseif($request->isMethod('post'))
|
||||
$action = $request->request->get('action');
|
||||
if(!$action = $this->getParam('action')) {
|
||||
$request = $this->getParam('request');
|
||||
if($request) {
|
||||
if($request->isMethod('get'))
|
||||
$action = $request->query->get('action');
|
||||
elseif($request->isMethod('post'))
|
||||
$action = $request->request->get('action');
|
||||
}
|
||||
}
|
||||
if(!$this->callHook('preRun', get_class($this), $action ? $action : 'run')) {
|
||||
if($action) {
|
||||
|
@ -78,6 +80,8 @@ class SeedDMS_Controller_Common {
|
|||
}
|
||||
} else
|
||||
return $this->run();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
$this->callHook('postRun', get_class($this), $action ? $action : 'run');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user