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

@ -1,9 +1,16 @@
<query id="getBoardList" action="select">
<tables>
<table name="modules" />
<table name="domains" type="left join">
<conditions>
<condition operation="equal" column="modules.domain_srl" default="domains.domain_srl" />
<condition operation="notequal" column="modules.domain_srl" default="-1" />
</conditions>
</table>
</tables>
<columns>
<column name="*" />
<column name="modules.*" />
<column name="domains.domain" />
</columns>
<conditions>
<condition operation="equal" column="module" default="board" />

View file

@ -15,11 +15,17 @@
<section class="section">
<h1>{$lang->subtitle_primary}</h1>
<div cond="$logged_info->is_admin == 'Y'" class="x_control-group">
<label class="x_control-label" for="board_name">{$lang->mid}</label>
<label class="x_control-label" for="board_name">{$lang->url}</label>
<div class="x_controls">
<select name="domain_srl" id="domain_srl">
<option value="-1" selected="selected"|cond="!isset($module_info->domain_srl) || $module_info->domain_srl == -1">{$lang->cmd_any_domain}</option>
<!--@foreach(ModuleModel::getAllDomains(100)->data as $domain)-->
<option value="{$domain->domain_srl}" selected="selected"|cond="$domain->domain_srl == $module_info->domain_srl">{$domain->domain}</option>
<!--@endif-->
</select>
<span class="baseurl">{\RX_BASEURL}</span>
<input type="text" name="board_name" id="board_name" value="{$module_info->mid}" />
<a href="#module_name_help" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
<p id="module_name_help" class="x_help-block" hidden>{$lang->about_mid}</p>
<p class="x_help-block">{$lang->about_mid}</p>
</div>
</div>
<div class="x_control-group">

View file

@ -12,7 +12,8 @@
<tr>
<th scope="col">{$lang->no}</th>
<th scope="col">{$lang->module_category}</th>
<th scope="col">{$lang->mid}</th>
<th scope="col" class="domain_prefix">{$lang->domain} /</th>
<th scope="col">{$lang->url}</th>
<th scope="col">{$lang->browser_title}</th>
<th scope="col">{$lang->regdate}</th>
<th scope="col">{$lang->cmd_edit}</th>
@ -29,6 +30,7 @@
</block>
<block cond="$val->module_category_srl">{$module_category[$val->module_category_srl]->title}</block>
</td>
<td class="domain_prefix">{$val->domain ?? '*'}{\RX_BASEURL}</td>
<td>{$val->mid}</td>
<td><a href="{getSiteUrl($val->domain,'','mid',$val->mid)}">{$val->browser_title}</a></td>
<td>{zdate($val->regdate,"Y-m-d")}</td>