mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Merge branch 'rhymix:master' into master
This commit is contained in:
commit
a40502885e
34 changed files with 259 additions and 140 deletions
|
|
@ -317,13 +317,14 @@ class Context
|
|||
$lang->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
|
||||
$lang->loadDirectory(RX_BASEDIR . 'modules/module/lang', 'module');
|
||||
self::setLangType(self::$_instance->lang_type = $lang_type);
|
||||
self::set('lang', self::$_instance->lang = $lang);
|
||||
|
||||
// Set global variables for backward compatibility.
|
||||
$GLOBALS['oContext'] = self::$_instance;
|
||||
$GLOBALS['__Context__'] = &self::$_user_vars;
|
||||
$GLOBALS['_time_zone'] = config('locale.default_timezone');
|
||||
$GLOBALS['lang'] = &$lang;
|
||||
self::$_user_vars->lang = $lang;
|
||||
self::$_instance->lang = $lang;
|
||||
|
||||
// set session handler
|
||||
if(self::isInstalled() && config('session.use_db'))
|
||||
|
|
@ -1488,9 +1489,18 @@ class Context
|
|||
}
|
||||
foreach($val as $_key => $_val)
|
||||
{
|
||||
if(is_array($_val))
|
||||
if($is_array)
|
||||
{
|
||||
$_val = self::_filterRequestVar($key, $_val);
|
||||
if(in_array($key, array('mid', 'vid', 'act', 'module')))
|
||||
{
|
||||
self::$_instance->security_check = 'DENY ALL';
|
||||
self::$_instance->security_check_detail = 'ERR_UNSAFE_VAR';
|
||||
$_val = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
$_val = self::_filterRequestVar($key, $_val);
|
||||
}
|
||||
}
|
||||
elseif($_val = trim($_val))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class HTMLDisplayHandler
|
|||
'dispPageAdminMobileContentModify' => true,
|
||||
'dispPageAdminMobileContent' => true,
|
||||
);
|
||||
$current_act = Context::get('act') ?? '';
|
||||
$current_act = strval(Context::get('act'));
|
||||
if(Context::get('module') != 'admin' && strpos($current_act, 'Admin') !== false && !isset($x_exclude_actions[$current_act]))
|
||||
{
|
||||
$output = '<div class="x">' . $output . '</div>';
|
||||
|
|
|
|||
|
|
@ -88,11 +88,11 @@ class ModuleHandler extends Handler
|
|||
|
||||
// Set variables from request arguments
|
||||
$this->method = Context::getRequestMethod();
|
||||
$this->module = $module ? $module : Context::get('module');
|
||||
$this->act = $act ? $act : Context::get('act');
|
||||
$this->mid = $mid ? $mid : Context::get('mid');
|
||||
$this->document_srl = $document_srl ? (int) $document_srl : (int) Context::get('document_srl');
|
||||
$this->module_srl = $module_srl ? (int) $module_srl : (int) Context::get('module_srl');
|
||||
$this->module = strval($module ?: Context::get('module'));
|
||||
$this->act = strval($act ?: Context::get('act'));
|
||||
$this->mid = strval($mid ?: Context::get('mid'));
|
||||
$this->document_srl = intval($document_srl ?: Context::get('document_srl'));
|
||||
$this->module_srl = intval($module_srl ?: Context::get('module_srl'));
|
||||
$this->route = Context::getCurrentRequest() ?: new stdClass;
|
||||
$this->is_mobile = Mobile::isFromMobilePhone();
|
||||
if($entry = Context::get('entry'))
|
||||
|
|
@ -156,7 +156,7 @@ class ModuleHandler extends Handler
|
|||
$urls = array('success_return_url', 'error_return_url');
|
||||
foreach($urls as $key)
|
||||
{
|
||||
$url = Context::get($key);
|
||||
$url = strval(Context::get($key));
|
||||
if ($url && !Rhymix\Framework\URL::isInternalURL($url))
|
||||
{
|
||||
Context::set($key, null);
|
||||
|
|
@ -848,10 +848,15 @@ class ModuleHandler extends Handler
|
|||
$seo_title = config('seo.subpage_title') ?: '$SITE_TITLE - $SUBPAGE_TITLE';
|
||||
}
|
||||
$seo_title = Context::replaceUserLang($seo_title);
|
||||
$subpage_title = $module_info->browser_title;
|
||||
if (in_array($module_info->module, ['member']))
|
||||
{
|
||||
$subpage_title = '';
|
||||
}
|
||||
Context::setBrowserTitle($seo_title, array(
|
||||
'site_title' => Context::getSiteTitle(),
|
||||
'site_subtitle' => Context::getSiteSubtitle(),
|
||||
'subpage_title' => $module_info->browser_title,
|
||||
'subpage_title' => $subpage_title,
|
||||
'page' => Context::get('page') ?: 1,
|
||||
));
|
||||
|
||||
|
|
|
|||
|
|
@ -556,12 +556,13 @@ class Mail
|
|||
/**
|
||||
* Send the email.
|
||||
*
|
||||
* @param bool $sync
|
||||
* @return bool
|
||||
*/
|
||||
public function send(): bool
|
||||
public function send(bool $sync = false): bool
|
||||
{
|
||||
// If queue is enabled, send asynchronously.
|
||||
if (config('queue.enabled') && !defined('RXQUEUE_CRON'))
|
||||
if (!$sync && config('queue.enabled') && !defined('RXQUEUE_CRON'))
|
||||
{
|
||||
Queue::addTask(self::class . '::' . 'sendAsync', $this);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -398,12 +398,13 @@ class Push
|
|||
/**
|
||||
* Send the message.
|
||||
*
|
||||
* @param bool $sync
|
||||
* @return bool
|
||||
*/
|
||||
public function send(): bool
|
||||
public function send(bool $sync = false): bool
|
||||
{
|
||||
// If queue is enabled, send asynchronously.
|
||||
if (config('queue.enabled') && !defined('RXQUEUE_CRON'))
|
||||
if (!$sync && config('queue.enabled') && !defined('RXQUEUE_CRON'))
|
||||
{
|
||||
Queue::addTask(self::class . '::' . 'sendAsync', $this);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -626,7 +626,7 @@ class Router
|
|||
$route = preg_replace_callback('#\\$([a-zA-Z0-9_]+)(:[a-z]+)?#i', function($match) use(&$vars) {
|
||||
if (isset($vars[$match[1]]))
|
||||
{
|
||||
$replacement = urlencode($vars[$match[1]]);
|
||||
$replacement = urlencode(strval($vars[$match[1]]));
|
||||
unset($vars[$match[1]]);
|
||||
return (isset($match[2]) && $match[2] === ':delete') ? '' : $replacement;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -507,12 +507,13 @@ class SMS
|
|||
/**
|
||||
* Send the message.
|
||||
*
|
||||
* @param bool $sync
|
||||
* @return bool
|
||||
*/
|
||||
public function send(): bool
|
||||
public function send(bool $sync = false): bool
|
||||
{
|
||||
// If queue is enabled, send asynchronously.
|
||||
if (config('queue.enabled') && !defined('RXQUEUE_CRON'))
|
||||
if (!$sync && config('queue.enabled') && !defined('RXQUEUE_CRON'))
|
||||
{
|
||||
Queue::addTask(self::class . '::' . 'sendAsync', $this);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -317,11 +317,11 @@ class Security
|
|||
$check_csrf_token = config('security.check_csrf_token') ? true : false;
|
||||
if ($token = isset($_SERVER['HTTP_X_CSRF_TOKEN']) ? $_SERVER['HTTP_X_CSRF_TOKEN'] : null)
|
||||
{
|
||||
return Session::verifyToken($token, '', $check_csrf_token);
|
||||
return Session::verifyToken((string)$token, '', $check_csrf_token);
|
||||
}
|
||||
elseif ($token = isset($_REQUEST['_rx_csrf_token']) ? $_REQUEST['_rx_csrf_token'] : null)
|
||||
{
|
||||
return Session::verifyToken($token, '', $check_csrf_token);
|
||||
return Session::verifyToken((string)$token, '', $check_csrf_token);
|
||||
}
|
||||
elseif ($token = isset($_REQUEST['_fb_adsense_token']) ? $_REQUEST['_fb_adsense_token'] : null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ $lang->use_and_display = 'Use and Display Vote List';
|
|||
$lang->pc = 'PC';
|
||||
$lang->mobile = 'Mobile';
|
||||
$lang->mobile_view = 'Mobile View';
|
||||
$lang->about_mobile_view = 'Mobile View will display the best layout when you access the website with your smart phone.';
|
||||
$lang->about_mobile_view = 'Use different layouts and skins for PC and mobile.<br>Select "No" if you have installed an adaptive (responsive) theme that supports both PC and mobile.';
|
||||
$lang->simple_view = 'Simple View';
|
||||
$lang->detail_view = 'Detail View';
|
||||
$lang->more = 'More';
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ $lang->play = 'プレイ';
|
|||
$lang->use_and_display = '使用+推奨履歴公開';
|
||||
$lang->mobile = 'モバイル';
|
||||
$lang->mobile_view = 'モバイルスキン使用';
|
||||
$lang->about_mobile_view = 'スマートフォンなどを利用してサイトに接続した場合、モバイル画面に最適化されたレイアウトを使用するよう設定します。';
|
||||
$lang->about_mobile_view = 'PCとモバイルにそれぞれ異なるレイアウトとスキンを使用します。<br>PCとモバイルの両方に対応する適応型(反応型)テーマを使用する場合は、"いいえ"を選択してください。';
|
||||
$lang->simple_view = 'シンプルビュー';
|
||||
$lang->detail_view = '詳細ビュー';
|
||||
$lang->more = 'もっと見る';
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ $lang->use_and_display = '사용 + 추천내역 공개';
|
|||
$lang->pc = 'PC';
|
||||
$lang->mobile = '모바일';
|
||||
$lang->mobile_view = '모바일 뷰 사용';
|
||||
$lang->about_mobile_view = '스마트폰 등을 이용하여 접속할 때 모바일 화면에 최적화된 레이아웃을 이용하도록 합니다.';
|
||||
$lang->about_mobile_view = 'PC와 모바일에 각각 다른 레이아웃과 스킨을 사용합니다.<br>PC와 모바일을 모두 지원하는 적응형(반응형) 테마를 사용하신다면 "아니오"를 선택하세요.';
|
||||
$lang->simple_view = '간단보기';
|
||||
$lang->detail_view = '상세보기';
|
||||
$lang->more = '더보기';
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ $lang->reload = '重新加载';
|
|||
$lang->play = '播放';
|
||||
$lang->use_and_display = '使用+专题刊物历史';
|
||||
$lang->mobile_view = '开启移动版';
|
||||
$lang->about_mobile_view = '为智能手机访问网站,提供最佳视觉效果。';
|
||||
$lang->about_mobile_view = '在PC和手机上分别使用不同的布局和皮肤。<br>如果使用同时支持PC和手机的适应型(反应型)主题,请选择"不"。';
|
||||
$lang->simple_view = '预览';
|
||||
$lang->detail_view = '查看详情';
|
||||
$lang->more = '更多';
|
||||
|
|
|
|||
|
|
@ -293,5 +293,5 @@ $lang->reload = '重新讀取';
|
|||
$lang->play = '播放';
|
||||
$lang->use_and_display = '使用+專題刊物歷史';
|
||||
$lang->mobile_view = '手機瀏覽';
|
||||
$lang->about_mobile_view = '使用手機瀏覽時將會顯示最適當的畫面。';
|
||||
$lang->about_mobile_view = '在PC和手機上分別使用不同的佈局和皮膚。<br>如果使用同時支持PC和手機的適應型(反應型)主題,請選擇"不"。';
|
||||
$lang->more = '更多';
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
<input type="radio" name="use_mobile_view" id="use_mobile_view_n" value="N" checked="checked"|cond="!$use_mobile_view" />
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
<p class="x_help-block">{$lang->about_mobile_view}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
|
|
@ -88,7 +89,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="mobile_viewport">{$lang->mobile_viewport}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="mobile_viewport" id="mobile_viewport" value="{$mobile_viewport}" style="min-width: 80%" />
|
||||
<input type="text" name="mobile_viewport" id="mobile_viewport" value="{$mobile_viewport}" class="x_full-width" />
|
||||
<p class="x_help-block">{$lang->about_mobile_viewport} <a href="javascript:restoreDefaultViewport()">{$lang->restore_default_viewport}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="debug_log_filename">{$lang->debug_log_filename}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="debug_log_filename" id="debug_log_filename" value="{$debug_log_filename}" style="min-width: 80%" />
|
||||
<input type="text" name="debug_log_filename" id="debug_log_filename" value="{$debug_log_filename}" class="x_full-width" />
|
||||
<p class="x_help-block">{$lang->about_debug_log_filename}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -103,29 +103,29 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="meta_keywords">{$lang->site_meta_keywords}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="meta_keywords" id="meta_keywords" value="{$domain_info ? $domain_info->settings->meta_keywords : ''}" class="lang_code" />
|
||||
<input type="text" name="meta_keywords" id="meta_keywords" value="{$domain_info ? $domain_info->settings->meta_keywords : ''}" class="x_full-width lang_code" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="meta_description">{$lang->site_meta_description}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="meta_description" id="meta_description" value="{$domain_info ? $domain_info->settings->meta_description : ''}" class="lang_code" />
|
||||
<input type="text" name="meta_description" id="meta_description" value="{$domain_info ? $domain_info->settings->meta_description : ''}" class="x_full-width lang_code" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="html_header">{$lang->input_header_script}</label>
|
||||
<div class="x_controls" style="margin-right:14px">
|
||||
<textarea name="html_header" id="html_header" rows="6" style="width:100%">{$domain_info ? $domain_info->settings->html_header : ''}</textarea>
|
||||
<div class="x_controls">
|
||||
<textarea name="html_header" id="html_header" rows="6" class="x_full-width">{$domain_info ? $domain_info->settings->html_header : ''}</textarea>
|
||||
<div class="x_help-block">{$lang->detail_input_header_script}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="html_footer">{$lang->input_footer_script}</label>
|
||||
<div class="x_controls" style="margin-right:14px">
|
||||
<textarea name="html_footer" id="html_footer" rows="6" style="width:100%">{$domain_info ? $domain_info->settings->html_footer : ''}</textarea>
|
||||
<div class="x_controls">
|
||||
<textarea name="html_footer" id="html_footer" rows="6" class="x_full-width">{$domain_info ? $domain_info->settings->html_footer : ''}</textarea>
|
||||
<div class="x_help-block">{$lang->detail_input_footer_script}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,22 +12,22 @@
|
|||
<input type="hidden" name="xe_validator_id" value="modules/admin/tpl/config_security/1" />
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="mediafilter_whitelist">{$lang->mediafilter_whitelist}</label>
|
||||
<div class="x_controls" style="margin-right:14px">
|
||||
<textarea name="mediafilter_whitelist" id="mediafilter_whitelist" rows="8" style="width:100%;">{$mediafilter_whitelist}</textarea>
|
||||
<div class="x_controls">
|
||||
<textarea name="mediafilter_whitelist" id="mediafilter_whitelist" rows="8" class="x_full-width">{$mediafilter_whitelist}</textarea>
|
||||
<p class="x_help-block">{$lang->about_mediafilter_whitelist}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="mediafilter_classes">{$lang->mediafilter_classes}</label>
|
||||
<div class="x_controls" style="margin-right:14px">
|
||||
<textarea name="mediafilter_classes" id="mediafilter_classes" rows="4" style="width:100%;">{$mediafilter_classes}</textarea>
|
||||
<div class="x_controls">
|
||||
<textarea name="mediafilter_classes" id="mediafilter_classes" rows="4" class="x_full-width">{$mediafilter_classes}</textarea>
|
||||
<p class="x_help-block">{$lang->about_mediafilter_classes}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="robot_user_agents">{$lang->robot_user_agents}</label>
|
||||
<div class="x_controls" style="margin-right:14px">
|
||||
<textarea name="robot_user_agents" id="robot_user_agents" rows="4" style="width:100%;">{$robot_user_agents}</textarea>
|
||||
<div class="x_controls">
|
||||
<textarea name="robot_user_agents" id="robot_user_agents" rows="4" class="x_full-width">{$robot_user_agents}</textarea>
|
||||
<p class="x_help-block">{$lang->about_robot_user_agents}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,35 +13,35 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="seo_main_title">{$lang->seo_main_title}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="seo_main_title" id="seo_main_title" value="{$seo_main_title}" style="min-width: 80%" class="lang_code" />
|
||||
<input type="text" name="seo_main_title" id="seo_main_title" value="{$seo_main_title}" class="x_full-width lang_code" />
|
||||
<p class="x_help-block">{$lang->about_seo_main_title}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="seo_subpage_title">{$lang->seo_subpage_title}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="seo_subpage_title" id="seo_subpage_title" value="{$seo_subpage_title}" style="min-width: 80%" class="lang_code" />
|
||||
<input type="text" name="seo_subpage_title" id="seo_subpage_title" value="{$seo_subpage_title}" class="x_full-width lang_code" />
|
||||
<p class="x_help-block">{$lang->about_seo_subpage_title}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="seo_document_title">{$lang->seo_document_title}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="seo_document_title" id="seo_document_title" value="{$seo_document_title}" style="min-width: 80%" class="lang_code" />
|
||||
<input type="text" name="seo_document_title" id="seo_document_title" value="{$seo_document_title}" class="x_full-width lang_code" />
|
||||
<p class="x_help-block">{$lang->about_seo_document_title}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="site_meta_keywords">{$lang->site_meta_keywords}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="site_meta_keywords" id="site_meta_keywords" value="{$site_meta_keywords}" style="min-width: 80%" class="lang_code" />
|
||||
<input type="text" name="site_meta_keywords" id="site_meta_keywords" value="{$site_meta_keywords}" class="x_full-width lang_code" />
|
||||
<p class="x_help-block">{$lang->about_site_meta_keywords}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="site_meta_description">{$lang->site_meta_description}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="site_meta_description" id="site_meta_description" value="{$site_meta_description}" style="min-width: 80%" class="lang_code" />
|
||||
<input type="text" name="site_meta_description" id="site_meta_description" value="{$site_meta_description}" class="x_full-width lang_code" />
|
||||
<p class="x_help-block">{$lang->about_site_meta_description}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@
|
|||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="sitelock_message">{$lang->sitelock_message}</label>
|
||||
<div class="x_controls" style="margin-right:14px">
|
||||
<textarea name="sitelock_message" id="sitelock_message" rows="6" style="width:100%;">{$sitelock_message}</textarea>
|
||||
<div class="x_controls">
|
||||
<textarea name="sitelock_message" id="sitelock_message" rows="6" class="x_full-width">{$sitelock_message}</textarea>
|
||||
<span class="x_help-block">{$lang->sitelock_message_help}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -310,7 +310,8 @@
|
|||
.x input.x_full-width,
|
||||
.x textarea.x_full-width,
|
||||
.x .x_uneditable-input.x_full-width{width:calc(100% - 14px)}
|
||||
.x textarea{height:auto}
|
||||
.x textarea.x_full-width.lang_code{width:calc(100% - 42px)}
|
||||
.x textarea{height:auto;min-height:80px;resize:vertical}
|
||||
.x textarea,
|
||||
.x input[type="text"],
|
||||
.x input[type="password"],
|
||||
|
|
|
|||
|
|
@ -281,8 +281,7 @@ class BoardView extends Board
|
|||
public function dispBoardContentView()
|
||||
{
|
||||
// get the variable value
|
||||
$document_srl = Context::get('document_srl');
|
||||
$page = Context::get('page');
|
||||
$document_srl = (int)Context::get('document_srl');
|
||||
|
||||
/**
|
||||
* if the document exists, then get the document information
|
||||
|
|
@ -541,7 +540,7 @@ class BoardView extends Board
|
|||
return;
|
||||
}
|
||||
|
||||
// setup module_srl/page number/ list number/ page count
|
||||
// Setup basic parameters such as module and page.
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $this->include_modules ?: $this->module_srl;
|
||||
$args->page = intval(Context::get('page')) ?: null;
|
||||
|
|
@ -553,48 +552,78 @@ class BoardView extends Board
|
|||
$args->start_regdate = date('YmdHis', time() - ($this->module_info->include_days * 86400));
|
||||
}
|
||||
|
||||
// get the search target and keyword
|
||||
// Filter by search target and keyword.
|
||||
if ($this->grant->view)
|
||||
{
|
||||
$args->search_target = Context::get('search_target');
|
||||
$args->search_keyword = Context::get('search_keyword');
|
||||
$args->search_target = (string)Context::get('search_target');
|
||||
$args->search_keyword = (string)Context::get('search_keyword');
|
||||
|
||||
// Remove unsupported search target
|
||||
$search_option = Context::get('search_option') ?: $this->search_option;
|
||||
if ($args->search_target !== '' && !isset($search_option[$args->search_target]))
|
||||
{
|
||||
$args->search_target = '';
|
||||
$args->search_keyword = '';
|
||||
}
|
||||
}
|
||||
|
||||
if(!$search_option = Context::get('search_option'))
|
||||
// Filter by category.
|
||||
if ($this->module_info->use_category === 'Y')
|
||||
{
|
||||
$search_option = $this->search_option;
|
||||
}
|
||||
if(!isset($search_option[$args->search_target]))
|
||||
{
|
||||
$args->search_target = '';
|
||||
$args->category_srl = (string)Context::get('category') ?: null;
|
||||
|
||||
// Support comma-separated categories #2519
|
||||
if ($args->category_srl)
|
||||
{
|
||||
$args->category_srl = array_map('intval', explode(',', $args->category_srl));
|
||||
if (count($args->category_srl) === 1)
|
||||
{
|
||||
$args->category_srl = $args->category_srl[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set member_srl for view particular member's document
|
||||
if($this->module_info->use_anonymous !== 'Y')
|
||||
// Filter by consultation member_srl, or the member_srl parameter if given.
|
||||
if ($this->consultation)
|
||||
{
|
||||
$args->member_srl = abs(Context::get('member_srl') ?? 0) ?: null;
|
||||
if ($this->module_info->use_anonymous === 'Y')
|
||||
{
|
||||
$args->member_srl = [$this->user->member_srl, $this->user->member_srl * -1];
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->member_srl = $this->user->member_srl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->module_info->use_anonymous !== 'Y')
|
||||
{
|
||||
$args->member_srl = abs(intval(Context::get('member_srl'))) ?: null;
|
||||
}
|
||||
}
|
||||
|
||||
// if the category is enabled, then get the category
|
||||
if($this->module_info->use_category=='Y')
|
||||
// If we are filtering by category or search keyword, use search_list_count instead of list_count.
|
||||
if (!empty($args->category_srl) || !empty($args->search_keyword))
|
||||
{
|
||||
$args->category_srl = Context::get('category');
|
||||
$args->list_count = $this->search_list_count;
|
||||
}
|
||||
|
||||
// setup the sort index and order index
|
||||
$args->sort_index = Context::get('sort_index');
|
||||
$args->order_type = Context::get('order_type');
|
||||
if(!in_array($args->sort_index, $this->order_target))
|
||||
// Setup sorting.
|
||||
$args->sort_index = (string)Context::get('sort_index');
|
||||
$args->order_type = (string)Context::get('order_type');
|
||||
if (!in_array($args->sort_index, $this->order_target ?? []))
|
||||
{
|
||||
$args->sort_index = $this->module_info->order_target?$this->module_info->order_target:'list_order';
|
||||
$args->sort_index = $this->module_info->order_target ?: 'list_order';
|
||||
}
|
||||
if(!in_array($args->order_type, array('asc','desc')))
|
||||
if (!in_array($args->order_type, ['asc', 'desc']))
|
||||
{
|
||||
$args->order_type = $this->module_info->order_type?$this->module_info->order_type:'asc';
|
||||
$args->order_type = $this->module_info->order_type ?: 'asc';
|
||||
}
|
||||
|
||||
// set the current page of documents
|
||||
$document_srl = Context::get('document_srl');
|
||||
// Find the page on which the current document is located.
|
||||
// This is very resource-intensive, so we only do it when necessary.
|
||||
$document_srl = (int)Context::get('document_srl') ?: null;
|
||||
if($document_srl && $this->module_info->skip_bottom_list_for_robot !== 'N' && isCrawler())
|
||||
{
|
||||
Context::set('page', $args->page = null);
|
||||
|
|
@ -618,27 +647,6 @@ class BoardView extends Board
|
|||
}
|
||||
}
|
||||
|
||||
// setup the list count to be serach list count, if the category or search keyword has been set
|
||||
if($args->category_srl ?? null || $args->search_keyword ?? null)
|
||||
{
|
||||
$args->list_count = $this->search_list_count;
|
||||
}
|
||||
|
||||
// if the consultation function is enabled, the get the logged user information
|
||||
if($this->consultation)
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
if($this->module_info->use_anonymous === 'Y')
|
||||
{
|
||||
$args->member_srl = array($logged_info->member_srl, $logged_info->member_srl * -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
}
|
||||
}
|
||||
|
||||
// setup the list config variable on context
|
||||
Context::set('list_config', $this->listConfig);
|
||||
|
||||
|
|
|
|||
|
|
@ -52,13 +52,13 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_meta_keywords">{$lang->meta_keywords}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="meta_keywords" id="meta_keywords" value="{$module_info->meta_keywords}" class="lang_code" />
|
||||
<input type="text" name="meta_keywords" id="meta_keywords" value="{$module_info->meta_keywords}" class="x_full-width lang_code" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_meta_description">{$lang->meta_description}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="meta_description" id="meta_description" value="{$module_info->meta_description}" class="lang_code" />
|
||||
<input type="text" name="meta_description" id="meta_description" value="{$module_info->meta_description}" class="x_full-width lang_code" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
|
|
@ -104,14 +104,14 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_header_text">{$lang->header_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="header_text" id="header_text" class="lang_code" rows="8" cols="42">{$module_info->header_text}</textarea>
|
||||
<textarea name="header_text" id="header_text" class="x_full-width lang_code" rows="8" cols="42">{$module_info->header_text}</textarea>
|
||||
<p id="header_text_help" class="x_help-block">{$lang->about_header_text}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_footer_text">{$lang->footer_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="footer_text" id="footer_text" class="lang_code" rows="8" cols="42">{$module_info->footer_text}</textarea>
|
||||
<textarea name="footer_text" id="footer_text" class="x_full-width lang_code" rows="8" cols="42">{$module_info->footer_text}</textarea>
|
||||
<p id="footer_text_help" class="x_help-block">{$lang->about_footer_text}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -121,9 +121,18 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->mobile_view}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="use_mobile"><input type="checkbox" name="use_mobile" id="use_mobile" value="Y" checked="checked"|cond="$module_info->use_mobile == 'Y'" /> {$lang->about_mobile_view}</label>
|
||||
<label for="use_mobile_y" class="x_inline">
|
||||
<input type="radio" name="use_mobile" id="use_mobile_y" value="Y" checked="checked"|cond="$module_info->use_mobile === 'Y'" />
|
||||
{$lang->cmd_yes}
|
||||
</label>
|
||||
<label for="use_mobile_n" class="x_inline">
|
||||
<input type="radio" name="use_mobile" id="use_mobile_n" value="N" checked="checked"|cond="$module_info->use_mobile !== 'Y'" />
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
<p class="x_help-block">{$lang->about_mobile_view}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hide-if-not-mobile-view">
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="mlayout_srl">{$lang->mobile_layout}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -169,17 +178,18 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_mobile_header_text">{$lang->mobile_header_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="mobile_header_text" id="mobile_header_text" class="lang_code" rows="8" cols="42">{$module_info->mobile_header_text}</textarea>
|
||||
<textarea name="mobile_header_text" id="mobile_header_text" class="x_full-width lang_code" rows="8" cols="42">{$module_info->mobile_header_text}</textarea>
|
||||
<p id="mobile_header_text_help" class="x_help-block">{$lang->about_mobile_header_text}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_mobile_footer_text">{$lang->mobile_footer_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="mobile_footer_text" id="mobile_footer_text" class="lang_code" rows="8" cols="42">{$module_info->mobile_footer_text}</textarea>
|
||||
<textarea name="mobile_footer_text" id="mobile_footer_text" class="x_full-width lang_code" rows="8" cols="42">{$module_info->mobile_footer_text}</textarea>
|
||||
<p id="mobile_footer_text_help" class="x_help-block">{$lang->about_mobile_footer_text}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section">
|
||||
<h1>{$lang->cmd_list_setting}</h1>
|
||||
|
|
@ -260,6 +270,13 @@
|
|||
</section>
|
||||
<section class="section">
|
||||
<h1>{$lang->subtitle_advanced}</h1>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->consultation}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="consultation"><input type="checkbox" name="consultation" id="consultation" value="Y" checked="checked"|cond="$module_info->consultation == 'Y'" /> {$lang->use_consultation}</label>
|
||||
<p class="x_help-block">{$lang->about_consultation}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->use_anonymous}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -301,13 +318,6 @@
|
|||
<p class="x_help-block">{$lang->about_inline_data_url_limit}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->consultation}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="consultation"><input type="checkbox" name="consultation" id="consultation" value="Y" checked="checked"|cond="$module_info->consultation == 'Y'" /> {$lang->use_consultation}</label>
|
||||
<p class="x_help-block">{$lang->about_consultation}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->update_log}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
|
|
@ -147,3 +147,18 @@ function doSaveListConfig(module_srl)
|
|||
|
||||
exec_json('board.procBoardAdminInsertListConfig', params, function() { location.reload(); });
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#use_mobile_y,#use_mobile_n').on('change', function() {
|
||||
if ($(this).is(':checked')) {
|
||||
if ($(this).val() == 'Y') {
|
||||
$('.hide-if-not-mobile-view').show();
|
||||
} else {
|
||||
$('.hide-if-not-mobile-view').hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
if ($('#use_mobile_n').is(':checked')) {
|
||||
$('.hide-if-not-mobile-view').hide();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -137,6 +137,15 @@ class CommunicationView extends communication
|
|||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('message_list..nick_name');
|
||||
|
||||
if ($message)
|
||||
{
|
||||
Context::addBrowserTitle($message->title);
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::addBrowserTitle(lang('communication.message_box.' . $message_type));
|
||||
}
|
||||
|
||||
$this->setTemplateFile($template_filename);
|
||||
}
|
||||
|
||||
|
|
@ -177,6 +186,7 @@ class CommunicationView extends communication
|
|||
Context::set('message', $message);
|
||||
}
|
||||
|
||||
Context::addBrowserTitle($message->title ?? lang('cmd_view_message_box'));
|
||||
$this->setTemplateFile('new_message');
|
||||
}
|
||||
|
||||
|
|
@ -303,6 +313,7 @@ class CommunicationView extends communication
|
|||
$editor = $oEditorModel->getEditor(getNextSequence(), $option);
|
||||
$editor = $editor . "\n" . '<input type="hidden" name="temp_srl" value="" />' . "\n";
|
||||
Context::set('editor', $editor);
|
||||
Context::addBrowserTitle(lang('cmd_send_message'));
|
||||
$this->setTemplateFile('send_message');
|
||||
|
||||
// Fix for skins that don't support window_type=self
|
||||
|
|
@ -376,6 +387,7 @@ class CommunicationView extends communication
|
|||
Context::set('friend_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_view_friend'));
|
||||
$this->setTemplateFile('friends');
|
||||
}
|
||||
|
||||
|
|
@ -448,6 +460,7 @@ class CommunicationView extends communication
|
|||
$friend_group_list = $oCommunicationModel->getFriendGroups();
|
||||
Context::set('friend_group_list', $friend_group_list);
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_add_friend'));
|
||||
$this->setTemplateFile('add_friend');
|
||||
|
||||
// Fix for skins that don't support window_type=self
|
||||
|
|
@ -511,6 +524,7 @@ class CommunicationView extends communication
|
|||
}
|
||||
}
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_add_friend_group'));
|
||||
$this->setTemplateFile('add_friend_group');
|
||||
|
||||
// Fix for skins that don't support window_type=self
|
||||
|
|
|
|||
|
|
@ -1453,7 +1453,7 @@ class DocumentModel extends Document
|
|||
$query_id = null;
|
||||
$use_division = false;
|
||||
$search_target = $searchOpt->search_target ?? null;
|
||||
$search_keyword = trim($searchOpt->search_keyword ?? '') ?: null;
|
||||
$search_keyword = strval($searchOpt->search_keyword ?? '') ?: null;
|
||||
|
||||
// search
|
||||
if($search_target && $search_keyword)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="header_script">{$lang->header_script}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="header_script" id="header_script" rows="4" cols="42">{$selected_layout->header_script}</textarea>
|
||||
<textarea name="header_script" id="header_script" rows="4" cols="42" class="x_full-width">{$selected_layout->header_script}</textarea>
|
||||
<span class="x_help-block">{$lang->about_header_script}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
{@$group = ''}
|
||||
{@$cnt = 1}
|
||||
|
||||
|
||||
<block loop="$selected_layout->extra_var => $name, $var">
|
||||
<block cond="$cnt == 1 && $var->group"><div class="x_tab-content"></block>
|
||||
<block cond="$group != $var->group">
|
||||
|
|
|
|||
|
|
@ -38,15 +38,15 @@ class MemberController extends Member
|
|||
// User ID, email address or phone number
|
||||
if (!$user_id)
|
||||
{
|
||||
$user_id = trim(Context::get('user_id'));
|
||||
$user_id = (string)Context::get('user_id');
|
||||
}
|
||||
if (!$user_id && $config->identifiers && in_array('email_address', $config->identifiers))
|
||||
{
|
||||
$user_id = trim(Context::get('email_address'));
|
||||
$user_id = (string)Context::get('email_address');
|
||||
}
|
||||
if (!$user_id && $config->identifiers && in_array('phone_number', $config->identifiers))
|
||||
{
|
||||
$user_id = trim(Context::get('phone_number'));
|
||||
$user_id = (string)Context::get('phone_number');
|
||||
}
|
||||
if (!$user_id)
|
||||
{
|
||||
|
|
@ -56,7 +56,7 @@ class MemberController extends Member
|
|||
// Password
|
||||
if (!$password)
|
||||
{
|
||||
$password = trim(Context::get('password'));
|
||||
$password = (string)Context::get('password');
|
||||
}
|
||||
if (!$password)
|
||||
{
|
||||
|
|
@ -1334,7 +1334,7 @@ class MemberController extends Member
|
|||
{
|
||||
if(!Context::get('is_logged')) throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
// Extract the necessary information in advance
|
||||
$password = trim(Context::get('password'));
|
||||
$password = (string)Context::get('password');
|
||||
// Get information of logged-in user
|
||||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = $logged_info->member_srl;
|
||||
|
|
@ -4137,7 +4137,7 @@ class MemberController extends Member
|
|||
}
|
||||
if ($formInfo->name === 'password' && $args->{$formInfo->name})
|
||||
{
|
||||
$password_check = trim(Context::get('password2'));
|
||||
$password_check = (string)Context::get('password2');
|
||||
if ($password_check !== '' && !hash_equals($args->password, $password_check))
|
||||
{
|
||||
return new BaseObject(-1, 'msg_password_mismatch');
|
||||
|
|
|
|||
|
|
@ -181,6 +181,7 @@ class MemberView extends Member
|
|||
$member_info->group_list[$key] = Context::replaceUserLang($val, true);
|
||||
}
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_view_member_info'));
|
||||
Context::set('memberInfo', get_object_vars($member_info));
|
||||
|
||||
$extendForm = MemberModel::getCombineJoinForm($member_info);
|
||||
|
|
@ -375,6 +376,7 @@ class MemberView extends Member
|
|||
$member_config->agreement = $member_config->agreements[1]->content ?? '';
|
||||
|
||||
// Set a template file
|
||||
Context::addBrowserTitle(lang('cmd_signup'));
|
||||
$this->setTemplateFile('signup_form');
|
||||
}
|
||||
|
||||
|
|
@ -411,6 +413,7 @@ class MemberView extends Member
|
|||
Context::set('identifierValue', $logged_info->user_id);
|
||||
}
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_modify_member_info'));
|
||||
$this->setTemplateFile('rechecked_password');
|
||||
}
|
||||
|
||||
|
|
@ -496,6 +499,7 @@ class MemberView extends Member
|
|||
$this->addExtraFormValidatorMessage();
|
||||
|
||||
// Set a template file
|
||||
Context::addBrowserTitle(lang('cmd_modify_member_info'));
|
||||
$this->setTemplateFile('modify_info');
|
||||
}
|
||||
|
||||
|
|
@ -546,6 +550,7 @@ class MemberView extends Member
|
|||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('document_list...title', 'search_target', 'search_keyword');
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_view_own_document'));
|
||||
$this->setTemplateFile('document_list');
|
||||
}
|
||||
|
||||
|
|
@ -593,6 +598,7 @@ class MemberView extends Member
|
|||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('search_target', 'search_keyword');
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_view_own_comment'));
|
||||
$this->setTemplateFile('comment_list');
|
||||
}
|
||||
|
||||
|
|
@ -702,6 +708,7 @@ class MemberView extends Member
|
|||
$security = new Security($output->data);
|
||||
$security->encodeHTML('..nick_name');
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_view_scrapped_document'));
|
||||
$this->setTemplateFile('scrapped_list');
|
||||
}
|
||||
|
||||
|
|
@ -736,6 +743,7 @@ class MemberView extends Member
|
|||
Context::set('document_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_view_saved_document'));
|
||||
$this->setTemplateFile('saved_list');
|
||||
}
|
||||
|
||||
|
|
@ -775,6 +783,7 @@ class MemberView extends Member
|
|||
$output = executeQueryArray('member.getMemberDevice', $args);
|
||||
Context::set('registered_devices', $output->data);
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_view_active_logins'));
|
||||
$this->setTemplateFile('active_logins');
|
||||
}
|
||||
|
||||
|
|
@ -813,6 +822,7 @@ class MemberView extends Member
|
|||
}
|
||||
|
||||
// Set a template file
|
||||
Context::addBrowserTitle(lang('cmd_login'));
|
||||
$this->setTemplateFile('login_form');
|
||||
}
|
||||
|
||||
|
|
@ -848,6 +858,7 @@ class MemberView extends Member
|
|||
Context::set('formValue', $member_info->email_address);
|
||||
}
|
||||
// Set a template file
|
||||
Context::addBrowserTitle(lang('cmd_modify_member_password'));
|
||||
$this->setTemplateFile('modify_password');
|
||||
}
|
||||
|
||||
|
|
@ -882,6 +893,7 @@ class MemberView extends Member
|
|||
Context::set('formValue', $member_info->email_address);
|
||||
}
|
||||
// Set a template file
|
||||
Context::addBrowserTitle(lang('msg_leave_member'));
|
||||
$this->setTemplateFile('leave_form');
|
||||
}
|
||||
|
||||
|
|
@ -931,6 +943,7 @@ class MemberView extends Member
|
|||
Context::set('identifier', $this->member_config->identifier);
|
||||
Context::set('enable_find_account_question', 'N');
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_find_member_account'));
|
||||
$this->setTemplateFile('find_member_account');
|
||||
}
|
||||
|
||||
|
|
@ -949,6 +962,7 @@ class MemberView extends Member
|
|||
return;
|
||||
}
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_resend_auth_mail'));
|
||||
$this->setTemplateFile('resend_auth_mail');
|
||||
}
|
||||
|
||||
|
|
@ -968,6 +982,7 @@ class MemberView extends Member
|
|||
|
||||
$_SESSION['rechecked_password_step'] = 'INPUT_DATA';
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_modify_member_email_address'));
|
||||
$this->setTemplateFile('modify_email_address');
|
||||
}
|
||||
|
||||
|
|
@ -1086,6 +1101,7 @@ class MemberView extends Member
|
|||
Context::set('nickname_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
Context::addBrowserTitle(lang('cmd_modify_nickname_log'));
|
||||
$this->setTemplateFile('member_nick');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -677,6 +677,8 @@ class MenuAdminController extends Menu
|
|||
$cmArgs->menu_srl = $request->menu_srl;
|
||||
$cmArgs->layout_srl = -1;
|
||||
$cmArgs->mlayout_srl = -1;
|
||||
$cmArgs->skin = '/USE_DEFAULT/';
|
||||
$cmArgs->mskin = ModuleModel::getModuleDefaultSkin($cmArgs->module, 'M') ?: '/USE_DEFAULT/';
|
||||
$cmArgs->is_skin_fix = 'N';
|
||||
$cmArgs->is_mskin_fix = 'N';
|
||||
|
||||
|
|
|
|||
|
|
@ -986,9 +986,16 @@ class ModuleModel extends Module
|
|||
if(array_key_exists($moduleName, $installedMenuTypes))
|
||||
{
|
||||
$defaultSkinName = self::getModuleDefaultSkin($module, $dir == 'skins' ? 'P' : 'M');
|
||||
if(isset($defaultSkinName))
|
||||
if ($defaultSkinName)
|
||||
{
|
||||
$defaultSkinInfo = self::loadSkinInfo($path, $defaultSkinName, $dir);
|
||||
if ($defaultSkinName === '/USE_RESPONSIVE/')
|
||||
{
|
||||
$defaultSkinInfo = (object)array('title' => lang('use_responsive_pc_skin'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$defaultSkinInfo = self::loadSkinInfo($path, $defaultSkinName, $dir);
|
||||
}
|
||||
|
||||
$useDefault = new stdClass();
|
||||
$useDefault->title = lang('use_site_default_skin') . ' (' . ($defaultSkinInfo->title ?? null) . ')';
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ class NcenterliteView extends Ncenterlite
|
|||
Context::set('ncenterlite_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
Context::addBrowserTitle(lang('ncenterlite_my_list'));
|
||||
$this->setTemplateFileOrDefault('NotifyList');
|
||||
}
|
||||
|
||||
|
|
@ -85,6 +86,7 @@ class NcenterliteView extends Ncenterlite
|
|||
Context::set('sms_available', Rhymix\Framework\SMS::getDefaultDriver()->getName() !== 'Dummy');
|
||||
Context::set('push_available', count(Rhymix\Framework\Config::get('push.types') ?? []) > 0);
|
||||
|
||||
Context::addBrowserTitle(lang('ncenterlite_my_settings'));
|
||||
$this->setTemplateFileOrDefault('userconfig');
|
||||
}
|
||||
|
||||
|
|
@ -138,6 +140,7 @@ class NcenterliteView extends Ncenterlite
|
|||
Context::set('unsubscribe_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
Context::addBrowserTitle(lang('unsubscribe_list'));
|
||||
$this->setTemplateFileOrDefault('unsubscribeList');
|
||||
}
|
||||
|
||||
|
|
@ -227,6 +230,7 @@ class NcenterliteView extends Ncenterlite
|
|||
Context::set('text', $text);
|
||||
Context::set('type', $type);
|
||||
|
||||
Context::addBrowserTitle(lang('unsubscribe_list'));
|
||||
$this->setTemplateFileOrDefault('unsubscribe');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ function completeArticleDocumentInserted(ret_obj){
|
|||
alert(message);
|
||||
|
||||
var url = '';
|
||||
|
||||
|
||||
if(is_mobile == 'Y')
|
||||
url = current_url.setQuery('act', 'dispPageAdminMobileContent').setQuery('mid', mid);
|
||||
else
|
||||
|
|
@ -103,7 +103,7 @@ function doRemoveWidgetCache(module_srl) {
|
|||
|
||||
function completeRemoveWidgetCache(ret_obj) {
|
||||
var message = ret_obj['message'];
|
||||
location.reload();
|
||||
location.reload();
|
||||
}
|
||||
|
||||
/* 일괄 설정 */
|
||||
|
|
@ -131,4 +131,17 @@ jQuery(function($){
|
|||
$('#opage_proc_php').prop('checked', true);
|
||||
}
|
||||
});
|
||||
|
||||
$('#use_mobile_y,#use_mobile_n').on('change', function() {
|
||||
if ($(this).is(':checked')) {
|
||||
if ($(this).val() == 'Y') {
|
||||
$('.hide-if-not-mobile-view').show();
|
||||
} else {
|
||||
$('.hide-if-not-mobile-view').hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
if ($('#use_mobile_n').is(':checked')) {
|
||||
$('.hide-if-not-mobile-view').hide();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<!--#include("header.html")-->
|
||||
<include target="header.html" />
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/page/tpl/page_info/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
|
@ -60,22 +61,27 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_meta_keywords">{$lang->meta_keywords}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="meta_keywords" id="meta_keywords" value="<!--@if(strpos($module_info->meta_keywords, '$user_lang->') === false)-->{$module_info->meta_keywords}<!--@else-->{htmlspecialchars($module_info->meta_keywords)}<!--@end-->" class="lang_code" />
|
||||
<input type="text" name="meta_keywords" id="meta_keywords" value="<!--@if(strpos($module_info->meta_keywords, '$user_lang->') === false)-->{$module_info->meta_keywords}<!--@else-->{htmlspecialchars($module_info->meta_keywords)}<!--@end-->" class="x_full-width lang_code" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_meta_description">{$lang->meta_description}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="meta_description" id="meta_description" value="<!--@if(strpos($module_info->meta_description, '$user_lang->') === false)-->{$module_info->meta_description}<!--@else-->{htmlspecialchars($module_info->meta_description)}<!--@end-->" class="lang_code" />
|
||||
<input type="text" name="meta_description" id="meta_description" value="<!--@if(strpos($module_info->meta_description, '$user_lang->') === false)-->{$module_info->meta_description}<!--@else-->{htmlspecialchars($module_info->meta_description)}<!--@end-->" class="x_full-width lang_code" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->mobile_view}</label>
|
||||
<div class="x_controls">
|
||||
<label for="use_mobile">
|
||||
<input type="checkbox" name="use_mobile" id="use_mobile" value="Y" checked="checked"|cond="$module_info->use_mobile == 'Y'" />
|
||||
{$lang->about_mobile_view}
|
||||
<label for="use_mobile_y" class="x_inline">
|
||||
<input type="radio" name="use_mobile" id="use_mobile_y" value="Y" checked="checked"|cond="$module_info->use_mobile === 'Y'" />
|
||||
{$lang->cmd_yes}
|
||||
</label>
|
||||
<label for="use_mobile_n" class="x_inline">
|
||||
<input type="radio" name="use_mobile" id="use_mobile_n" value="N" checked="checked"|cond="$module_info->use_mobile !== 'Y'" />
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
<p class="x_help-block">{$lang->about_mobile_view}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
|
|
@ -88,7 +94,7 @@
|
|||
<p class="x_help-block" id="aboutLayout">{$lang->about_layout}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-group hide-if-not-mobile-view">
|
||||
<label class="x_control-label" for="mlayout_srl">{$lang->mobile_layout}</label>
|
||||
<div class="x_controls">
|
||||
<select name="mlayout_srl" id="mlayout_srl">
|
||||
|
|
@ -112,7 +118,7 @@
|
|||
<p class="x_help-block" id="aboutOpagePath">{$lang->about_opage_path}<b>{realpath("./")}</b></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$module_info->page_type == 'OUTSIDE'">
|
||||
<div class="x_control-group hide-if-not-mobile-view" cond="$module_info->page_type == 'OUTSIDE'">
|
||||
<label class="x_control-label" for="mpath">{$lang->opage_mobile_path}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="mpath" id="mpath" value="{$module_info->mpath}" />
|
||||
|
|
@ -142,7 +148,7 @@
|
|||
<p class="x_help-block" id="aboutSkin">{$lang->about_skin}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group optionnalData articleType" cond="$module_info->page_type == 'ARTICLE'">
|
||||
<div class="x_control-group hide-if-not-mobile-view optionnalData articleType" cond="$module_info->page_type == 'ARTICLE'">
|
||||
<label class="x_control-label" for="mskin">{$lang->mobile_skin}</label>
|
||||
<div class="x_controls">
|
||||
<select name="mskin">
|
||||
|
|
|
|||
|
|
@ -44,8 +44,9 @@ class PointModel extends Point
|
|||
}
|
||||
|
||||
// Get from object cache
|
||||
$use_cache = Rhymix\Framework\Cache::getDriverName() !== 'dummy';
|
||||
$cache_key = sprintf('member:point:%d', $member_srl);
|
||||
if (!$from_db)
|
||||
if (!$from_db && $use_cache)
|
||||
{
|
||||
$point = Rhymix\Framework\Cache::get($cache_key);
|
||||
if ($point !== null)
|
||||
|
|
@ -56,15 +57,18 @@ class PointModel extends Point
|
|||
}
|
||||
|
||||
// Get from file cache
|
||||
$cache_path = sprintf(RX_BASEDIR . 'files/member_extra_info/point/%s', getNumberingPath($member_srl));
|
||||
$cache_filename = sprintf('%s/%d.cache.txt', $cache_path, $member_srl);
|
||||
if (!$from_db && file_exists($cache_filename))
|
||||
if (!$from_db && !$use_cache)
|
||||
{
|
||||
$point = trim(Rhymix\Framework\Storage::read($cache_filename));
|
||||
if ($point !== '')
|
||||
$cache_path = sprintf(RX_BASEDIR . 'files/member_extra_info/point/%s', getNumberingPath($member_srl));
|
||||
$cache_filename = sprintf('%s/%d.cache.txt', $cache_path, $member_srl);
|
||||
if (file_exists($cache_filename))
|
||||
{
|
||||
$exists = true;
|
||||
return self::$_member_point_cache[$member_srl] = intval($point);
|
||||
$point = trim(Rhymix\Framework\Storage::read($cache_filename));
|
||||
if ($point !== '')
|
||||
{
|
||||
$exists = true;
|
||||
return self::$_member_point_cache[$member_srl] = intval($point);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -85,7 +89,7 @@ class PointModel extends Point
|
|||
|
||||
// Save to cache
|
||||
self::$_member_point_cache[$member_srl] = $point;
|
||||
if (Rhymix\Framework\Cache::getDriverName() !== 'dummy')
|
||||
if ($use_cache)
|
||||
{
|
||||
Rhymix\Framework\Cache::set($cache_key, $point);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue