Add option to make pages available only on one domain

- 2021년에 next 브랜치 적용을 목표로 작업했던 것 가져옴
- modules 테이블에 domain_srl을 추가하여 특정 도메인에서만 유효하도록 설정 가능
- site_srl 변수를 사용하던 곳 중 삭제할 수 있는 곳은 모두 삭제함
This commit is contained in:
Kijin Sung 2023-06-18 02:40:09 +09:00
parent ded3b97208
commit f596947d0e
57 changed files with 163 additions and 197 deletions

View file

@ -193,6 +193,15 @@ class ModuleHandler extends Handler
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($module_info->domain_srl != $site_module_info->domain_srl)
{
$this->error = 'msg_module_is_not_exists';
$this->httpStatusCode = 404;
return true;
}
}
}
// Set module info as the default module for the domain.