mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix incorrect request_uri and other JS variables if accessed on an unconfigured domain
This commit is contained in:
parent
4869d4384d
commit
5dcc0f92a4
1 changed files with 9 additions and 0 deletions
|
|
@ -151,7 +151,16 @@ class ModuleHandler extends Handler
|
|||
$site_module_info->domain = Rhymix\Framework\URL::getCurrentDomain();
|
||||
$site_module_info->is_default_domain = 'N';
|
||||
$site_module_info->is_default_replaced = true;
|
||||
|
||||
// Reset context variables if the domain was replaced.
|
||||
Context::set('site_module_info', $site_module_info);
|
||||
Context::set('_default_url', null);
|
||||
Context::set('request_uri', $current_url = Context::getRequestUri());
|
||||
if ($query_string = http_build_query(Context::getCurrentRequest()->args))
|
||||
{
|
||||
$current_url .= '?' . $query_string;
|
||||
}
|
||||
Context::set('current_url', $current_url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue