mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
#226 지정된 mid 또는 module에 속하지 않은 action이 실행되지 않도록 제한 및 우회하기 위한 standalone 명세를 추가.
This commit is contained in:
parent
2bd745b627
commit
2b4650ec34
2 changed files with 17 additions and 5 deletions
|
|
@ -895,6 +895,7 @@ class moduleModel extends module
|
|||
|
||||
$type = $action->attrs->type;
|
||||
$grant = $action->attrs->grant?$action->attrs->grant:'guest';
|
||||
$standalone = $action->attrs->standalone=='true'?'true':'false';
|
||||
$ruleset = $action->attrs->ruleset?$action->attrs->ruleset:'';
|
||||
$method = $action->attrs->method?$action->attrs->method:'';
|
||||
|
||||
|
|
@ -907,6 +908,7 @@ class moduleModel extends module
|
|||
$info->action->{$name} = new stdClass();
|
||||
$info->action->{$name}->type = $type;
|
||||
$info->action->{$name}->grant = $grant;
|
||||
$info->action->{$name}->standalone = ($standalone == 'true') ? TRUE : FALSE;
|
||||
$info->action->{$name}->ruleset = $ruleset;
|
||||
$info->action->{$name}->method = $method;
|
||||
if($action->attrs->menu_name)
|
||||
|
|
@ -929,6 +931,7 @@ class moduleModel extends module
|
|||
$buff[] = sprintf('$info->action->%s = new stdClass;', $name);
|
||||
$buff[] = sprintf('$info->action->%s->type=\'%s\';', $name, $type);
|
||||
$buff[] = sprintf('$info->action->%s->grant=\'%s\';', $name, $grant);
|
||||
$buff[] = sprintf('$info->action->%s->standalone=\'%s\';', $name, $standalone);
|
||||
$buff[] = sprintf('$info->action->%s->ruleset=\'%s\';', $name, $ruleset);
|
||||
$buff[] = sprintf('$info->action->%s->method=\'%s\';', $name, $method);
|
||||
|
||||
|
|
@ -959,6 +962,8 @@ class moduleModel extends module
|
|||
$buff['simple_setup_index_act'] = sprintf($buff['simple_setup_index_act'], $simple_setup_index_act);
|
||||
$buff['admin_index_act'] = sprintf($buff['admin_index_act'], $admin_index_act);
|
||||
|
||||
$buff[] = 'return $info;';
|
||||
|
||||
$buff = implode(PHP_EOL, $buff);
|
||||
|
||||
FileHandler::writeFile($cache_file, $buff);
|
||||
|
|
@ -966,9 +971,7 @@ class moduleModel extends module
|
|||
return $info;
|
||||
}
|
||||
|
||||
if(file_exists($cache_file)) include($cache_file);
|
||||
|
||||
return $info;
|
||||
if(file_exists($cache_file)) return include($cache_file);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue