diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index bbd61953a..9dde027fd 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -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)) { diff --git a/classes/display/HTMLDisplayHandler.php b/classes/display/HTMLDisplayHandler.php index d2263caf4..0246c3a87 100644 --- a/classes/display/HTMLDisplayHandler.php +++ b/classes/display/HTMLDisplayHandler.php @@ -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 = '
' . $output . '
'; diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 790cf5811..8d5ebfe70 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -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, )); diff --git a/common/framework/Mail.php b/common/framework/Mail.php index bcf9b62a3..72c226c95 100644 --- a/common/framework/Mail.php +++ b/common/framework/Mail.php @@ -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; diff --git a/common/framework/Push.php b/common/framework/Push.php index bc37cd2c7..be8f7b0c2 100644 --- a/common/framework/Push.php +++ b/common/framework/Push.php @@ -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; diff --git a/common/framework/Router.php b/common/framework/Router.php index d4cac045a..021449f90 100644 --- a/common/framework/Router.php +++ b/common/framework/Router.php @@ -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; } diff --git a/common/framework/SMS.php b/common/framework/SMS.php index 4bb65fd60..7f9da9f5d 100644 --- a/common/framework/SMS.php +++ b/common/framework/SMS.php @@ -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; diff --git a/common/framework/Security.php b/common/framework/Security.php index 741b32c65..ab708eb08 100644 --- a/common/framework/Security.php +++ b/common/framework/Security.php @@ -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) { diff --git a/common/lang/en.php b/common/lang/en.php index 5178f3049..4bc239931 100644 --- a/common/lang/en.php +++ b/common/lang/en.php @@ -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.
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'; diff --git a/common/lang/ja.php b/common/lang/ja.php index 24bbd7361..e790869ea 100644 --- a/common/lang/ja.php +++ b/common/lang/ja.php @@ -311,7 +311,7 @@ $lang->play = 'プレイ'; $lang->use_and_display = '使用+推奨履歴公開'; $lang->mobile = 'モバイル'; $lang->mobile_view = 'モバイルスキン使用'; -$lang->about_mobile_view = 'スマートフォンなどを利用してサイトに接続した場合、モバイル画面に最適化されたレイアウトを使用するよう設定します。'; +$lang->about_mobile_view = 'PCとモバイルにそれぞれ異なるレイアウトとスキンを使用します。
PCとモバイルの両方に対応する適応型(反応型)テーマを使用する場合は、"いいえ"を選択してください。'; $lang->simple_view = 'シンプルビュー'; $lang->detail_view = '詳細ビュー'; $lang->more = 'もっと見る'; diff --git a/common/lang/ko.php b/common/lang/ko.php index 1fb0e4d13..ab22c229c 100644 --- a/common/lang/ko.php +++ b/common/lang/ko.php @@ -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와 모바일에 각각 다른 레이아웃과 스킨을 사용합니다.
PC와 모바일을 모두 지원하는 적응형(반응형) 테마를 사용하신다면 "아니오"를 선택하세요.'; $lang->simple_view = '간단보기'; $lang->detail_view = '상세보기'; $lang->more = '더보기'; diff --git a/common/lang/zh-CN.php b/common/lang/zh-CN.php index af89c4acb..9a857ef95 100644 --- a/common/lang/zh-CN.php +++ b/common/lang/zh-CN.php @@ -293,7 +293,7 @@ $lang->reload = '重新加载'; $lang->play = '播放'; $lang->use_and_display = '使用+专题刊物历史'; $lang->mobile_view = '开启移动版'; -$lang->about_mobile_view = '为智能手机访问网站,提供最佳视觉效果。'; +$lang->about_mobile_view = '在PC和手机上分别使用不同的布局和皮肤。
如果使用同时支持PC和手机的适应型(反应型)主题,请选择"不"。'; $lang->simple_view = '预览'; $lang->detail_view = '查看详情'; $lang->more = '更多'; diff --git a/common/lang/zh-TW.php b/common/lang/zh-TW.php index 7febef246..c64451977 100644 --- a/common/lang/zh-TW.php +++ b/common/lang/zh-TW.php @@ -293,5 +293,5 @@ $lang->reload = '重新讀取'; $lang->play = '播放'; $lang->use_and_display = '使用+專題刊物歷史'; $lang->mobile_view = '手機瀏覽'; -$lang->about_mobile_view = '使用手機瀏覽時將會顯示最適當的畫面。'; +$lang->about_mobile_view = '在PC和手機上分別使用不同的佈局和皮膚。
如果使用同時支持PC和手機的適應型(反應型)主題,請選擇"不"。'; $lang->more = '更多'; diff --git a/modules/admin/tpl/config_advanced.html b/modules/admin/tpl/config_advanced.html index 6373337fe..7c4540f59 100644 --- a/modules/admin/tpl/config_advanced.html +++ b/modules/admin/tpl/config_advanced.html @@ -30,6 +30,7 @@ {$lang->cmd_no} +

{$lang->about_mobile_view}

@@ -88,7 +89,7 @@
- +

{$lang->about_mobile_viewport} {$lang->restore_default_viewport}

diff --git a/modules/admin/tpl/config_debug.html b/modules/admin/tpl/config_debug.html index 7da23e493..77335c9e4 100644 --- a/modules/admin/tpl/config_debug.html +++ b/modules/admin/tpl/config_debug.html @@ -69,7 +69,7 @@
- +

{$lang->about_debug_log_filename}

diff --git a/modules/admin/tpl/config_domains_edit.html b/modules/admin/tpl/config_domains_edit.html index b0887d794..159227a62 100644 --- a/modules/admin/tpl/config_domains_edit.html +++ b/modules/admin/tpl/config_domains_edit.html @@ -103,29 +103,29 @@
- +
- +
-
- +
+
{$lang->detail_input_header_script}
-
- +
+
{$lang->detail_input_footer_script}
diff --git a/modules/admin/tpl/config_security.html b/modules/admin/tpl/config_security.html index 2f06e0b30..34dd49b69 100644 --- a/modules/admin/tpl/config_security.html +++ b/modules/admin/tpl/config_security.html @@ -12,22 +12,22 @@
-
- +
+

{$lang->about_mediafilter_whitelist}

-
- +
+

{$lang->about_mediafilter_classes}

-
- +
+

{$lang->about_robot_user_agents}

diff --git a/modules/admin/tpl/config_seo.html b/modules/admin/tpl/config_seo.html index c664876e4..8267e800f 100644 --- a/modules/admin/tpl/config_seo.html +++ b/modules/admin/tpl/config_seo.html @@ -13,35 +13,35 @@
- +

{$lang->about_seo_main_title}

- +

{$lang->about_seo_subpage_title}

- +

{$lang->about_seo_document_title}

- +

{$lang->about_site_meta_keywords}

- +

{$lang->about_site_meta_description}

diff --git a/modules/admin/tpl/config_sitelock.html b/modules/admin/tpl/config_sitelock.html index d31fce9c7..c759cf316 100644 --- a/modules/admin/tpl/config_sitelock.html +++ b/modules/admin/tpl/config_sitelock.html @@ -34,8 +34,8 @@
-
- +
+ {$lang->sitelock_message_help}
diff --git a/modules/admin/tpl/css/admin.bootstrap.css b/modules/admin/tpl/css/admin.bootstrap.css index 0d97ca6e9..a87f10ffb 100644 --- a/modules/admin/tpl/css/admin.bootstrap.css +++ b/modules/admin/tpl/css/admin.bootstrap.css @@ -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"], diff --git a/modules/board/board.view.php b/modules/board/board.view.php index a95c3b648..82953eea3 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -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); diff --git a/modules/board/tpl/board_insert.html b/modules/board/tpl/board_insert.html index 01640d43f..ee7a65019 100644 --- a/modules/board/tpl/board_insert.html +++ b/modules/board/tpl/board_insert.html @@ -52,13 +52,13 @@
- +
- +
@@ -104,14 +104,14 @@
- +

{$lang->about_header_text}

- +
@@ -121,9 +121,18 @@
- + + +

{$lang->about_mobile_view}

+
@@ -169,17 +178,18 @@
- +

{$lang->about_mobile_header_text}

- +
+

{$lang->cmd_list_setting}

@@ -260,6 +270,13 @@

{$lang->subtitle_advanced}

+
+ +
+ +

{$lang->about_consultation}

+
+
@@ -301,13 +318,6 @@

{$lang->about_inline_data_url_limit}

-
- -
- -

{$lang->about_consultation}

-
-
diff --git a/modules/board/tpl/js/board_admin.js b/modules/board/tpl/js/board_admin.js index 540d8428c..53f4de04a 100644 --- a/modules/board/tpl/js/board_admin.js +++ b/modules/board/tpl/js/board_admin.js @@ -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(); + } +}); diff --git a/modules/communication/communication.view.php b/modules/communication/communication.view.php index 1aab6dcdf..f5b6cb1e4 100644 --- a/modules/communication/communication.view.php +++ b/modules/communication/communication.view.php @@ -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" . '' . "\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 diff --git a/modules/document/document.model.php b/modules/document/document.model.php index 1c9909195..fc1e32a38 100644 --- a/modules/document/document.model.php +++ b/modules/document/document.model.php @@ -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) diff --git a/modules/layout/tpl/layout_info_view.html b/modules/layout/tpl/layout_info_view.html index 884d49bea..a9fbb7322 100644 --- a/modules/layout/tpl/layout_info_view.html +++ b/modules/layout/tpl/layout_info_view.html @@ -45,7 +45,7 @@
- + {$lang->about_header_script}
@@ -64,7 +64,7 @@ {@$group = ''} {@$cnt = 1} - +
diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index 9f02548a6..eaf597a12 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -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'); diff --git a/modules/member/member.view.php b/modules/member/member.view.php index b11318e26..e5140ccf4 100644 --- a/modules/member/member.view.php +++ b/modules/member/member.view.php @@ -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'); } } diff --git a/modules/menu/menu.admin.controller.php b/modules/menu/menu.admin.controller.php index 14878695a..137be685e 100644 --- a/modules/menu/menu.admin.controller.php +++ b/modules/menu/menu.admin.controller.php @@ -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'; diff --git a/modules/module/module.model.php b/modules/module/module.model.php index 4530f252b..e2a43e5d3 100644 --- a/modules/module/module.model.php +++ b/modules/module/module.model.php @@ -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) . ')'; diff --git a/modules/ncenterlite/ncenterlite.view.php b/modules/ncenterlite/ncenterlite.view.php index 19f434704..aae27b923 100644 --- a/modules/ncenterlite/ncenterlite.view.php +++ b/modules/ncenterlite/ncenterlite.view.php @@ -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'); } diff --git a/modules/page/tpl/js/page_admin.js b/modules/page/tpl/js/page_admin.js index 929a95380..02664497c 100644 --- a/modules/page/tpl/js/page_admin.js +++ b/modules/page/tpl/js/page_admin.js @@ -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(); + } }); diff --git a/modules/page/tpl/page_info.html b/modules/page/tpl/page_info.html index e3635a746..cc704d07a 100644 --- a/modules/page/tpl/page_info.html +++ b/modules/page/tpl/page_info.html @@ -1,4 +1,5 @@ - + +

{$XE_VALIDATOR_MESSAGE}

@@ -60,22 +61,27 @@
- +
- +
-
@@ -88,7 +94,7 @@

{$lang->about_layout}

-
+
@@ -142,7 +148,7 @@

{$lang->about_skin}

-
+