mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 07:12:15 +09:00
Add options in module.xml to disable session and Cache-Control headers for individual actions
This commit is contained in:
parent
3722c49750
commit
ec36839303
3 changed files with 18 additions and 4 deletions
|
|
@ -127,6 +127,8 @@ class Router
|
|||
$result->mid = '';
|
||||
$result->act = '';
|
||||
$result->forwarded = false;
|
||||
$result->session = true;
|
||||
$result->cache_control = true;
|
||||
$result->args = array();
|
||||
|
||||
// Separate additional arguments from the URL.
|
||||
|
|
@ -181,6 +183,8 @@ class Router
|
|||
$allargs = array_merge($args, [$prefix_type => $prefix]);
|
||||
$result->module = $module_name;
|
||||
$result->mid = $prefix;
|
||||
$result->session = ($action_info->action->{$action_info->default_index_act}->session === 'false') ? false : true;
|
||||
$result->cache_control = ($action_info->action->{$action_info->default_index_act}->cache_control === 'false') ? false : true;
|
||||
$result->args = $allargs;
|
||||
return $result;
|
||||
}
|
||||
|
|
@ -195,6 +199,8 @@ class Router
|
|||
$result->module = $module_name;
|
||||
$result->mid = $prefix_type === 'mid' ? $prefix : '';
|
||||
$result->act = $action;
|
||||
$result->session = ($action_info->action->{$action}->session === 'false') ? false : true;
|
||||
$result->cache_control = ($action_info->action->{$action}->cache_control === 'false') ? false : true;
|
||||
$result->args = $allargs;
|
||||
return $result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue