Merge branch 'rhymix:master' into master

This commit is contained in:
Lastorder 2025-09-06 15:48:53 +09:00 committed by GitHub
commit 2fd8df9de6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 384 additions and 162 deletions

View file

@ -242,7 +242,7 @@ class Context
else
{
$site_module_info = new stdClass;
$site_module_info->domain = $_SERVER['HTTP_HOST'];
$site_module_info->domain = Rhymix\Framework\URL::getCurrentDomain();
$site_module_info->security = RX_SSL ? 'always' : 'none';
$site_module_info->settings = new stdClass;
$site_module_info->is_default_replaced = true;

View file

@ -147,7 +147,11 @@ class ModuleHandler extends Handler
return true;
case 'display':
// pass
$site_module_info->domain_srl = -1;
$site_module_info->domain = Rhymix\Framework\URL::getCurrentDomain();
$site_module_info->is_default_domain = 'N';
$site_module_info->is_default_replaced = true;
Context::set('site_module_info', $site_module_info);
}
}
}
@ -182,8 +186,11 @@ class ModuleHandler extends Handler
}
}
// Initialize module info.
$module_info = null;
// Get module info from document_srl.
if($this->document_srl)
if($this->document_srl && !preg_match('/Admin/', $this->act))
{
$module_info = $this->_checkDocumentSrl();
if ($module_info === false)
@ -191,23 +198,21 @@ class ModuleHandler extends Handler
return false;
}
}
else
{
$module_info = null;
}
// Get module info from mid.
if(!$module_info && $this->mid)
{
$module_info = ModuleModel::getModuleInfoByMid($this->mid);
if($module_info && isset($module_info->domain_srl) && $module_info->domain_srl > -1)
}
// If the module does not belong to the current domain, throw a 404.
if($module_info && isset($module_info->domain_srl) && $module_info->domain_srl > -1)
{
if($module_info->domain_srl != $site_module_info->domain_srl)
{
if($module_info->domain_srl != $site_module_info->domain_srl)
{
$this->error = 'msg_module_is_not_exists';
$this->httpStatusCode = 404;
return true;
}
$this->error = 'msg_module_is_not_exists';
$this->httpStatusCode = 404;
return true;
}
}
@ -783,6 +788,14 @@ class ModuleHandler extends Handler
}
}
// Redirect if a member action is requested with an unnecessary document_srl. (For backward compatibility)
if(preg_match('/^disp(Member|Communication)/', $this->act))
{
Context::setCacheControl(0);
header('Location: ' . getNotEncodedUrl('document_srl', null), true, 301);
return false;
}
// Remove module info if a different module has already been selected for the current request.
if($this->module && $module_info->module !== $this->module)
{