(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;
}