X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=mw%2Fenv%2Fmodules%2Fmw_env_run.php;h=c0a97a29516b69a0b0476137c75004abffee95e5;hb=refs%2Ftags%2Fmtweb.0.9.2;hp=5d7a24d9ae24f49e8a8086681effd017ae168a80;hpb=422d883e3ed8ee55ee41e3b7826f32b79cea646d;p=mtweb diff --git a/mw/env/modules/mw_env_run.php b/mw/env/modules/mw_env_run.php index 5d7a24d..c0a97a2 100644 --- a/mw/env/modules/mw_env_run.php +++ b/mw/env/modules/mw_env_run.php @@ -137,16 +137,21 @@ return $OK; } - function run($etat, $valid_role = true, $params = array(), $method = "GET"){ + function run($etat, $params = array(), $valid_role = true){ if($this->set_etat($etat, $valid_role)){ if($controller = $this->get_controller($this->etat("mod")."/".$this->etat("controller"))){ $action_method = $this->etat("action"); if(method_exists($controller, $action_method)){ - foreach($params as $key => $value){ - switch(strtolower($method)){ - case "get": $_GET[$this->param($key)] = $value; break; - case "post": $_POST[$key] = $value; break; - default: break; + foreach($params as $params_method => $values){ + foreach($values as $key => $value){ + switch(strtolower($params_method)){ + case "get": + $_GET[$this->param($key)] = $value; + break; + case "post": + $_POST[$key] = $value; + break; + } } } if(($controller_validate = $controller->validate()) === true){