From 580588bbdcc0176e06622351bcdfe7c470bb4aab Mon Sep 17 00:00:00 2001 From: Lastorder <18280396+Lastorder-DC@users.noreply.github.com> Date: Tue, 15 Jul 2025 09:59:26 +0900 Subject: [PATCH 01/10] Fix typos in documentation and translation strings --- classes/validator/Validator.class.php | 4 ++-- modules/autoinstall/autoinstall.model.php | 2 +- modules/board/board.admin.view.php | 2 +- modules/communication/lang/en.php | 2 +- modules/importer/importer.admin.controller.php | 2 +- modules/member/member.controller.php | 2 +- modules/menu/menu.admin.model.php | 2 +- modules/module/lang/en.php | 2 +- modules/point/point.admin.controller.php | 2 +- modules/point/point.admin.view.php | 2 +- modules/poll/poll.model.php | 6 +++--- modules/poll/skins/default/skin.xml | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/classes/validator/Validator.class.php b/classes/validator/Validator.class.php index b8f563648..f6ba5ba19 100644 --- a/classes/validator/Validator.class.php +++ b/classes/validator/Validator.class.php @@ -389,8 +389,8 @@ class Validator } /** - * Returns the last error infomation including a field name and an error message. - * @return array The last error infomation + * Returns the last error information including a field name and an error message. + * @return array The last error information */ function getLastError() { diff --git a/modules/autoinstall/autoinstall.model.php b/modules/autoinstall/autoinstall.model.php index 787e3d05c..94e45644c 100644 --- a/modules/autoinstall/autoinstall.model.php +++ b/modules/autoinstall/autoinstall.model.php @@ -157,7 +157,7 @@ class autoinstallModel extends autoinstall * @param int $depth Depth of category * @param array $list Category list * @param array $resultList Final result list - * @return string $siblingList Comma seperated list + * @return string $siblingList Comma separated list */ function setDepth(&$item, $depth, &$list, &$resultList) { diff --git a/modules/board/board.admin.view.php b/modules/board/board.admin.view.php index 654c4347e..227b5d50b 100644 --- a/modules/board/board.admin.view.php +++ b/modules/board/board.admin.view.php @@ -25,7 +25,7 @@ class BoardAdminView extends Board { // generate module model object $oModuleModel = getModel('module'); - // get the module infomation based on the module_srl + // get the module information based on the module_srl if($module_srl) { $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl); if(!$module_info) { diff --git a/modules/communication/lang/en.php b/modules/communication/lang/en.php index 8c2ab9404..3e0b5cfe5 100644 --- a/modules/communication/lang/en.php +++ b/modules/communication/lang/en.php @@ -44,7 +44,7 @@ $lang->msg_send_mail_admin_only = 'The email option can only be used by the admi $lang->message_notice = 'Send a message to the author about this. If you don\'t write a message, it is not sent.'; $lang->friends_page_does_not_support = 'Friends in a mobile environment is not supported. Please go to the PC page.'; $lang->communication_send_message_grant = 'Send Message Grant'; -$lang->cmd_manage_base = 'Basic infomation'; +$lang->cmd_manage_base = 'Basic information'; $lang->alert_new_message_arrived = 'You have %d new message(s). Do you want to check it now?'; $lang->enable_communication_friend = 'Friend Enable'; $lang->enable_communication_message = 'Message Enable'; diff --git a/modules/importer/importer.admin.controller.php b/modules/importer/importer.admin.controller.php index 1c91c230e..865e6e2fe 100644 --- a/modules/importer/importer.admin.controller.php +++ b/modules/importer/importer.admin.controller.php @@ -1018,7 +1018,7 @@ class importerAdminController extends importer } else { - // Get parent comment infomation + // Get parent comment information $parent_args = new stdClass(); $parent_args->comment_srl = $obj->parent_srl; $parent_output = executeQuery('comment.getCommentListItem', $parent_args); diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index 26b3ea4d4..fe6a92e7a 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -4017,7 +4017,7 @@ class MemberController extends Member $logged_info = Context::get('logged_info'); $spam_description = trim( Context::get('spam_description') ); - // get member current infomation + // get member current information $member_info = MemberModel::getMemberInfoByMemberSrl($member_srl); $cnt_comment = CommentModel::getCommentCountByMemberSrl($member_srl); $cnt_document = DocumentModel::getDocumentCountByMemberSrl($member_srl); diff --git a/modules/menu/menu.admin.model.php b/modules/menu/menu.admin.model.php index 4f4907675..00e0fb2b2 100644 --- a/modules/menu/menu.admin.model.php +++ b/modules/menu/menu.admin.model.php @@ -149,7 +149,7 @@ class MenuAdminModel extends Menu /** * Return item information of the menu_srl - * group_srls uses a seperator with comma(,) and converts to an array by explode + * group_srls uses a separator with comma(,) and converts to an array by explode * @param int $menu_item_srl * @return object */ diff --git a/modules/module/lang/en.php b/modules/module/lang/en.php index 84b82034f..6fa5a0cff 100644 --- a/modules/module/lang/en.php +++ b/modules/module/lang/en.php @@ -111,7 +111,7 @@ $lang->about_search_virtual_site = 'Enter domain of virtual sites. To search mod $lang->about_extra_vars_eid_value = 'This is the unique ID for this field.
You can use a combination of Latin alphabets, numbers and underscore(_), as long as it starts with an alphabet.'; $lang->about_extra_vars_column_name = 'This is the name that is actually shown to users.'; $lang->about_extra_vars_description = 'The description entered here will be shown next to the input field.'; -$lang->about_langcode = 'If you want to configure seperately, use \'find language code\''; +$lang->about_langcode = 'If you want to configure separately, use \'find language code\''; $lang->about_file_extension = 'Only %s extension(s) is available.'; $lang->fail_module_regist = 'Fail Regist Module'; $lang->multilingual_desc = 'Rhymix supports 12 languages currently. If you want to use another language, translate one set of languages in /common/lang/ folder into that language and send it to us (devops@rhymix.org).'; diff --git a/modules/point/point.admin.controller.php b/modules/point/point.admin.controller.php index 7c9cb310f..f5721015d 100644 --- a/modules/point/point.admin.controller.php +++ b/modules/point/point.admin.controller.php @@ -316,7 +316,7 @@ class PointAdminController extends Point // A variable to store member's points $member = array(); - // Get member infomation + // Get member information $output = executeQueryArray('point.getMemberCount'); if(!$output->toBool()) return $output; diff --git a/modules/point/point.admin.view.php b/modules/point/point.admin.view.php index cb686ef5f..e491c778e 100644 --- a/modules/point/point.admin.view.php +++ b/modules/point/point.admin.view.php @@ -12,7 +12,7 @@ class PointAdminView extends Point */ function init() { - // Get teh configuration information + // Get the configuration information $oModuleModel = getModel('module'); $config = $oModuleModel->getModuleConfig('point'); // Set the configuration variable diff --git a/modules/poll/poll.model.php b/modules/poll/poll.model.php index ba3752ef4..d69aad101 100644 --- a/modules/poll/poll.model.php +++ b/modules/poll/poll.model.php @@ -15,7 +15,7 @@ class PollModel extends Poll } /** - * @brief returns poll infomation + * @brief returns poll information */ public function _getPollinfo($poll_srl) { @@ -77,7 +77,7 @@ class PollModel extends Poll } /** - * @brief returns poll infomation + * @brief returns poll information */ public function getPollinfo() { @@ -88,7 +88,7 @@ class PollModel extends Poll } /** - * @brief returns poll item infomation + * @brief returns poll item information */ public function getPollitemInfo() { diff --git a/modules/poll/skins/default/skin.xml b/modules/poll/skins/default/skin.xml index 32f822982..f6ef18029 100644 --- a/modules/poll/skins/default/skin.xml +++ b/modules/poll/skins/default/skin.xml @@ -3,7 +3,7 @@ 설문조사 기본 스킨 投票系统默认皮肤 アンケート調査デフォルトスキン - Default Skin of teh Poll + Default Skin of the Poll Skin mặc định của thăm dò 投票系統預設面板 Oylamanın Varsayılan Dış Görünümü From 93f0c10ade8a2d8ca3fe024228815257826919bf Mon Sep 17 00:00:00 2001 From: Waterticket Date: Fri, 18 Jul 2025 03:25:05 +0900 Subject: [PATCH 02/10] =?UTF-8?q?Fix:=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C=20th=EC=9D=98=20c?= =?UTF-8?q?olspan=EC=9D=84=20=EB=B0=98=EC=98=81=ED=95=98=EC=97=AC=20?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=EC=9D=98=20colspan=EC=9D=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=ED=95=98=EB=8F=84=EB=A1=9D=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/admin/tpl/js/admin.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 7881bcdf5..132e245a4 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -367,7 +367,17 @@ jQuery(function($){ $.fn.tableSpan = function(){ this.each(function(){ var $this = $(this); - var thNum = $this.find('>thead>tr:eq(0)>th').length; + var thList = $this.find('>thead>tr:eq(0)>th'); + var thNum = 0; + thList.each(function(){ + var $th = $(this); + if($th.attr('colspan')){ // th의 colspan 반영 + thNum += parseInt($th.attr('colspan'), 10); + } else { + thNum++; + } + }); + var $tdTarget = $this.find('>tbody>tr:eq(0)>td:only-child'); if(thNum != $tdTarget.attr('colspan')){ $tdTarget.attr('colspan', thNum).css('text-align','center'); From 796ecec247a70e371ce02733e755f4f6ec788c44 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 21 Jul 2025 00:57:47 +0900 Subject: [PATCH 03/10] Fix incorrect prefixing of CTE names and ON DUPLICATE KEY UPDATE ... #2587 --- common/framework/DB.php | 47 ++++++++++++++++++++++----------- tests/unit/framework/DBTest.php | 16 +++++++++++ 2 files changed, 47 insertions(+), 16 deletions(-) diff --git a/common/framework/DB.php b/common/framework/DB.php index f01339d36..3013fd803 100644 --- a/common/framework/DB.php +++ b/common/framework/DB.php @@ -1113,29 +1113,44 @@ class DB */ public function addPrefixes(string $query_string): string { + // Return early if no prefix is set. if (!$this->_prefix) { return $query_string; } + + // Generate a list of common table expressions (CTEs) to exclude from prefixing. + if (preg_match_all('/\bWITH(?:\s+RECURSIVE)?\s+`?(\w+)`?\s+AS\b/', $query_string, $matches)) + { + $exceptions = $matches[1]; + } else { - return preg_replace_callback('/((?:DELETE\s+)?FROM|JOIN|INTO|UPDATE)(?i)\s+((?:`?\w+\`?)(?:\s+AS\s+`?\w+`?)?(?:\s*,\s*(?:`?\w+\`?)(?:\s+AS\s+`?\w+`?)?)*)/', function($m) { - $type = strtoupper($m[1]); - $tables = array_map(function($str) use($type) { - return preg_replace_callback('/`?(\w+)`?(?:\s+AS\s+`?(\w+)`?)?/i', function($m) use($type) { - if ($type === 'FROM' || $type === 'JOIN') - { - return isset($m[2]) ? sprintf('`%s%s` AS `%s`', $this->_prefix, $m[1], $m[2]) : sprintf('`%s%s` AS `%s`', $this->_prefix, $m[1], $m[1]); - } - else - { - return isset($m[2]) ? sprintf('`%s%s` AS `%s`', $this->_prefix, $m[1], $m[2]) : sprintf('`%s%s`', $this->_prefix, $m[1]); - } - }, trim($str)); - }, explode(',', $m[2])); - return $m[1] . ' ' . implode(', ', $tables); - }, $query_string); + $exceptions = []; } + + // Add prefixes to all other table names in the query string. + return preg_replace_callback('/\b((?:DELETE\s+)?FROM|JOIN|INTO|(?_prefix, $m[1], $m[2]) : sprintf('`%s%s` AS `%s`', $this->_prefix, $m[1], $m[1]); + } + else + { + return isset($m[2]) ? sprintf('`%s%s` AS `%s`', $this->_prefix, $m[1], $m[2]) : sprintf('`%s%s`', $this->_prefix, $m[1]); + } + }, $str); + }, explode(',', $m[2])); + return $m[1] . ' ' . implode(', ', $tables); + }, $query_string); } /** diff --git a/tests/unit/framework/DBTest.php b/tests/unit/framework/DBTest.php index 41c5ccacc..cf1495224 100644 --- a/tests/unit/framework/DBTest.php +++ b/tests/unit/framework/DBTest.php @@ -159,6 +159,22 @@ class DBTest extends \Codeception\Test\Unit $target = 'DELETE FROM `' . $prefix . 'documents` WHERE d = ?'; $this->assertEquals($target, $oDB->addPrefixes($source)); + $source = 'WITH cte AS (SELECT * FROM documents) SELECT * FROM cte WHERE document_srl = ?'; + $target = 'WITH cte AS (SELECT * FROM `' . $prefix . 'documents` AS `documents`) SELECT * FROM cte WHERE document_srl = ?'; + $this->assertEquals($target, $oDB->addPrefixes($source)); + + $source = 'WITH RECURSIVE cte AS (SELECT * FROM documents INNER JOIN `cte`) SELECT * FROM cte JOIN member on cte.member_srl = member.member_srl'; + $target = 'WITH RECURSIVE cte AS (SELECT * FROM `' . $prefix . 'documents` AS `documents` INNER JOIN `cte`) SELECT * FROM cte JOIN `rx_member` AS `member` on cte.member_srl = member.member_srl'; + $this->assertEquals($target, $oDB->addPrefixes($source)); + + $source = 'WITH RECURSIVE `cte` AS (SELECT * FROM cte) SELECT * FROM cte WHERE a = ?'; + $target = 'WITH RECURSIVE `cte` AS (SELECT * FROM cte) SELECT * FROM cte WHERE a = ?'; + $this->assertEquals($target, $oDB->addPrefixes($source)); + + $source = 'INSERT INTO documents (a, b, c) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE b = ?, c = ?'; + $target = 'INSERT INTO `' . $prefix . 'documents` (a, b, c) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE b = ?, c = ?'; + $this->assertEquals($target, $oDB->addPrefixes($source)); + $source = 'update documents set a = ?, b = ? where c = ?'; $this->assertEquals($source, $oDB->addPrefixes($source)); From a2281edc7a83617dc4383379b4d8c9bfa9cf0578 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 21 Jul 2025 21:36:00 +0900 Subject: [PATCH 04/10] Fix incorrect textarea sizing when lang selector is active --- modules/admin/tpl/css/admin.bootstrap.css | 2 -- modules/admin/tpl/css/admin.css | 21 ++++++++++++++++--- modules/admin/tpl/js/admin.js | 25 ++++++++--------------- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/modules/admin/tpl/css/admin.bootstrap.css b/modules/admin/tpl/css/admin.bootstrap.css index f59f3fde2..bf4fc74a8 100644 --- a/modules/admin/tpl/css/admin.bootstrap.css +++ b/modules/admin/tpl/css/admin.bootstrap.css @@ -310,8 +310,6 @@ .x input.x_full-width, .x textarea.x_full-width, .x .x_uneditable-input.x_full-width{width:calc(100% - 14px);resize:vertical} -.x textarea.x_full-width.lang_code{width:calc(100% - 42px);resize:vertical} -.x textarea.x_full-width + textarea.lang_code{width:calc(100% - 42px);resize:vertical} .x textarea{height:auto;min-height:80px;} .x textarea, .x input[type="text"], diff --git a/modules/admin/tpl/css/admin.css b/modules/admin/tpl/css/admin.css index f5da99642..b93ec383e 100644 --- a/modules/admin/tpl/css/admin.css +++ b/modules/admin/tpl/css/admin.css @@ -1476,6 +1476,20 @@ margin-bottom: 10px; } } + +.x .g11n.x_input-append { + display: inline-flex; + align-items: flex-start; +} +.x .g11n.x_full-width { + width: 100%; +} +.x .g11n > input.lang_code, +.x .g11n > textarea.lang_code { + flex: 1; + width: unset; + min-width: 0; +} .x .g11n>.x_add-on { font-size: 0; position: relative; @@ -1492,8 +1506,9 @@ margin-bottom: 10px; } .x .g11n>.x_add-on.remover { display: none; - width: 26px; - height: 26px; + height: 16px; + padding: 4px; + box-sizing: content-box; } .x .g11n.active>[disabled] { padding-left: 25px; @@ -1501,7 +1516,7 @@ margin-bottom: 10px; background-repeat: no-repeat; } .x .g11n.active>.x_add-on.remover { - display: inline-block; + display: block; } .x .g11n>.x_add-on:hover>i { opacity: 1; diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 132e245a4..4d3d52c45 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -1916,6 +1916,7 @@ jQuery(function($){ // make UI var $this = $(this); + var width = $this.width(); var t = this; if($this.parent().hasClass('g11n')){ @@ -1933,13 +1934,12 @@ jQuery(function($){ function makeUI(){ var $multilingualWindow = $('#g11n'); - var width = $this.width(); var $displayInput; if(t.tagName == 'TEXTAREA' || $this.data('type') == 'textarea'){ - $displayInput = $('