From: dj3c1t Date: Fri, 9 May 2014 15:28:10 +0000 (+0200) Subject: algo action_allowed X-Git-Tag: mtweb.0.13.3~1 X-Git-Url: http://git.dj3c1t.com/?a=commitdiff_plain;ds=inline;h=af318ad7150a54780f3912d7fbf805c7382b2785;p=mtweb algo action_allowed --- diff --git a/mw/env/modules/mw_env_run.php b/mw/env/modules/mw_env_run.php index f88acd3..10a4022 100644 --- a/mw/env/modules/mw_env_run.php +++ b/mw/env/modules/mw_env_run.php @@ -117,21 +117,17 @@ (isset($action_roles[$action][0]) && $action_roles[$action][0]) || (isset($action_roles[$action][$id_role]) && $action_roles[$action][$id_role]); } - if(!$OK){ - $action = $etat["mod"]."/".$etat["controller"]; - if(isset($action_roles[$action])){ - $OK = - (isset($action_roles[$action][0]) && $action_roles[$action][0]) - || (isset($action_roles[$action][$id_role]) && $action_roles[$action][$id_role]); - } + $action = $etat["mod"]."/".$etat["controller"]; + if(isset($action_roles[$action])){ + $OK = + (isset($action_roles[$action][0]) && $action_roles[$action][0]) + || (isset($action_roles[$action][$id_role]) && $action_roles[$action][$id_role]); } - if(!$OK){ - $action = $etat["mod"]."/".$etat["controller"]."/".$etat["action"]; - if(isset($action_roles[$action])){ - $OK = - (isset($action_roles[$action][0]) && $action_roles[$action][0]) - || (isset($action_roles[$action][$id_role]) && $action_roles[$action][$id_role]); - } + $action = $etat["mod"]."/".$etat["controller"]."/".$etat["action"]; + if(isset($action_roles[$action])){ + $OK = + (isset($action_roles[$action][0]) && $action_roles[$action][0]) + || (isset($action_roles[$action][$id_role]) && $action_roles[$action][$id_role]); } if($OK) break; }