mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
Fix multidomain not working when domain is IDN
This commit is contained in:
parent
7c9b356662
commit
3ca551e5f2
2 changed files with 14 additions and 13 deletions
|
|
@ -80,7 +80,7 @@ class Session
|
|||
ini_set('session.use_cookies', 1);
|
||||
ini_set('session.use_only_cookies', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
session_set_cookie_params($lifetime, $path, null, $ssl_only, $ssl_only);
|
||||
session_set_cookie_params($lifetime, $path, $domain, $ssl_only, $ssl_only);
|
||||
session_name($session_name = Config::get('session.name') ?: session_name());
|
||||
|
||||
// Get session ID from POST parameter if using relaxed key checks.
|
||||
|
|
|
|||
|
|
@ -177,10 +177,11 @@ class moduleModel extends module
|
|||
/**
|
||||
* @brief Get the default mid according to the domain
|
||||
*/
|
||||
function getDefaultMid()
|
||||
function getDefaultMid($domain = null)
|
||||
{
|
||||
// Get current domain.
|
||||
$domain = strtolower(preg_replace('/:\d+$/', '', $_SERVER['HTTP_HOST']));
|
||||
$domain = $domain ?: strtolower(preg_replace('/:\d+$/', '', $_SERVER['HTTP_HOST']));
|
||||
$domain = Rhymix\Framework\URL::decodeIdna($domain);
|
||||
|
||||
// Find the domain information.
|
||||
$domain_info = $this->getSiteInfoByDomain($domain);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue