From a46217eb7e3dbf189de541269673796a808c5fd0 Mon Sep 17 00:00:00 2001 From: Lastorder <18280396+Lastorder-DC@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:28:55 +0900 Subject: [PATCH 01/17] Fix #2572 Also show mid at Include Boards setting --- modules/board/tpl/addition_setup.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/board/tpl/addition_setup.html b/modules/board/tpl/addition_setup.html index 954d0c56e..e73c5b5e1 100644 --- a/modules/board/tpl/addition_setup.html +++ b/modules/board/tpl/addition_setup.html @@ -19,7 +19,7 @@

{$lang->about_board_combined_board}

From 6df4d38e04194b5b00d9b403fff928b694465109 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 28 Jun 2025 10:20:16 +0900 Subject: [PATCH 02/17] Set permissions properly after copying or moving a custom file --- common/framework/Storage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/framework/Storage.php b/common/framework/Storage.php index 5fe64c477..6637c5cc0 100644 --- a/common/framework/Storage.php +++ b/common/framework/Storage.php @@ -560,6 +560,7 @@ class Storage return false; } } + chmod($destination, 0666 & ~self::getUmask()); } elseif ($type === 'move') { @@ -570,6 +571,7 @@ class Storage return false; } } + chmod($destination, 0666 & ~self::getUmask()); } else { From 47e45c4076279e15c81f5e695c22ccfc0352cfaf Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 28 Jun 2025 10:33:13 +0900 Subject: [PATCH 03/17] Fix type error when module_name is null --- modules/admin/controllers/AdminMenu.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/admin/controllers/AdminMenu.php b/modules/admin/controllers/AdminMenu.php index f9bc3880b..47aa98a3e 100644 --- a/modules/admin/controllers/AdminMenu.php +++ b/modules/admin/controllers/AdminMenu.php @@ -7,6 +7,7 @@ use MenuAdminController; use MenuAdminModel; use Rhymix\Framework\Cache; use Rhymix\Framework\Storage; +use Rhymix\Framework\Exceptions\TargetNotFound; use Rhymix\Modules\Admin\Models\AdminMenu as AdminMenuModel; use Rhymix\Modules\Admin\Models\Favorite as FavoriteModel; @@ -64,6 +65,10 @@ class AdminMenu extends Base { // Check if favorite exists. $module_name = Context::get('module_name'); + if (!$module_name) + { + throw new TargetNotFound(); + } $output = FavoriteModel::isFavorite($module_name); if(!$output->toBool()) { From f047e57521fa045f8b64293edc4544ca9d88d1c9 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 28 Jun 2025 10:39:07 +0900 Subject: [PATCH 04/17] Fix unresizable textarea that isn't x_full-width --- modules/admin/tpl/css/admin.bootstrap.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/admin/tpl/css/admin.bootstrap.css b/modules/admin/tpl/css/admin.bootstrap.css index a87f10ffb..537a78900 100644 --- a/modules/admin/tpl/css/admin.bootstrap.css +++ b/modules/admin/tpl/css/admin.bootstrap.css @@ -309,9 +309,10 @@ .x .x_uneditable-input{width:206px} .x input.x_full-width, .x textarea.x_full-width, -.x .x_uneditable-input.x_full-width{width:calc(100% - 14px)} -.x textarea.x_full-width.lang_code{width:calc(100% - 42px)} -.x textarea{height:auto;min-height:80px;resize:vertical} +.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"], .x input[type="password"], From e05e39a32f031264efe0c7cc193dfec415aeccc6 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 28 Jun 2025 10:52:42 +0900 Subject: [PATCH 05/17] Apply monospace font to header/footer script textarea for better readability --- modules/admin/tpl/config_domains_edit.html | 4 ++-- modules/admin/tpl/css/admin.bootstrap.css | 1 + modules/board/tpl/board_insert.html | 8 ++++---- modules/board/tpl/board_setup_basic.html | 4 ++-- modules/layout/tpl/layout_edit.html | 4 ++-- modules/layout/tpl/layout_info_view.html | 2 +- modules/module/tpl/include.module_setup.html | 4 ++-- modules/module/tpl/module_setup.html | 6 +++--- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/modules/admin/tpl/config_domains_edit.html b/modules/admin/tpl/config_domains_edit.html index 159227a62..f6d5c1aee 100644 --- a/modules/admin/tpl/config_domains_edit.html +++ b/modules/admin/tpl/config_domains_edit.html @@ -117,7 +117,7 @@
- +
{$lang->detail_input_header_script}
@@ -125,7 +125,7 @@
- +
{$lang->detail_input_footer_script}
diff --git a/modules/admin/tpl/css/admin.bootstrap.css b/modules/admin/tpl/css/admin.bootstrap.css index 537a78900..f59f3fde2 100644 --- a/modules/admin/tpl/css/admin.bootstrap.css +++ b/modules/admin/tpl/css/admin.bootstrap.css @@ -373,6 +373,7 @@ .x textarea:-ms-input-placeholder{color:#999999} .x input::-webkit-input-placeholder, .x textarea::-webkit-input-placeholder{color:#999999} +.x textarea.x_code-font, .x textarea.x_code-font + textarea.lang_code { font-family: Consolas, SF Mono, monospace !important; } .x .x_radio, .x .x_checkbox{min-height:20px;padding-left:20px} .x .x_radio input[type="radio"], diff --git a/modules/board/tpl/board_insert.html b/modules/board/tpl/board_insert.html index e3c0b5d91..f66a1d6e3 100644 --- a/modules/board/tpl/board_insert.html +++ b/modules/board/tpl/board_insert.html @@ -104,14 +104,14 @@
- +

{$lang->about_header_text}

- +
@@ -178,14 +178,14 @@
- +

{$lang->about_mobile_header_text}

- +
diff --git a/modules/board/tpl/board_setup_basic.html b/modules/board/tpl/board_setup_basic.html index 1782a07e3..bff67bfa2 100644 --- a/modules/board/tpl/board_setup_basic.html +++ b/modules/board/tpl/board_setup_basic.html @@ -11,7 +11,7 @@
- + {$lang->help}
@@ -19,7 +19,7 @@
- + {$lang->help}
diff --git a/modules/layout/tpl/layout_edit.html b/modules/layout/tpl/layout_edit.html index df5302182..15a51f97a 100644 --- a/modules/layout/tpl/layout_edit.html +++ b/modules/layout/tpl/layout_edit.html @@ -83,7 +83,7 @@

HTML - layout.html

- +
| {$widget->title} @@ -93,7 +93,7 @@

CSS - layout.css

- +
diff --git a/modules/layout/tpl/layout_info_view.html b/modules/layout/tpl/layout_info_view.html index 1d32aa128..9a8711e29 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}
diff --git a/modules/module/tpl/include.module_setup.html b/modules/module/tpl/include.module_setup.html index 106f9b50e..464d846ac 100644 --- a/modules/module/tpl/include.module_setup.html +++ b/modules/module/tpl/include.module_setup.html @@ -78,7 +78,7 @@
{@$use_multilang_textarea=true} - +

{$lang->about_header_text}

@@ -86,7 +86,7 @@
- +

{$lang->about_footer_text}

diff --git a/modules/module/tpl/module_setup.html b/modules/module/tpl/module_setup.html index d99fe0501..82a96ac8a 100644 --- a/modules/module/tpl/module_setup.html +++ b/modules/module/tpl/module_setup.html @@ -46,14 +46,14 @@
- +

{$lang->about_header_text}

- +

{$lang->about_footer_text}

@@ -68,5 +68,5 @@ - + From a90f991f6ce4c1acfd29002168217de9bb44534d Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 28 Jun 2025 10:54:33 +0900 Subject: [PATCH 06/17] Also apply monospace font to legacy layout edit screen --- modules/layout/tpl/layout_html_css_view.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/layout/tpl/layout_html_css_view.html b/modules/layout/tpl/layout_html_css_view.html index 7fb738c9f..6d09e664e 100644 --- a/modules/layout/tpl/layout_html_css_view.html +++ b/modules/layout/tpl/layout_html_css_view.html @@ -60,7 +60,7 @@

HTML - layout.html

- +
| {$widget->title} @@ -84,7 +84,7 @@

CSS - layout.css

- +
From ba12e1b3a4a8032cb7fce849ad07ba8177da1644 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 28 Jun 2025 11:00:51 +0900 Subject: [PATCH 07/17] Disable unsafe selections when the default value for a grant is manager --- modules/module/module.admin.model.php | 3 +++ modules/module/tpl/module_grants.html | 2 ++ 2 files changed, 5 insertions(+) diff --git a/modules/module/module.admin.model.php b/modules/module/module.admin.model.php index 0be94b122..a74fd0ea7 100644 --- a/modules/module/module.admin.model.php +++ b/modules/module/module.admin.model.php @@ -174,11 +174,13 @@ class ModuleAdminModel extends Module // Get a permission group granted to the current module $selected_group = array(); + $default_xml_grant = array(); $default_grant = array(); foreach ($grant_list as $key => $val) { if (!empty($val->default)) { + $default_xml_grant[$key] = $val->default; $default_grant[$key] = $val->default; } } @@ -203,6 +205,7 @@ class ModuleAdminModel extends Module } } Context::set('selected_group', $selected_group); + Context::set('default_xml_grant', $default_xml_grant); Context::set('default_grant', $default_grant); Context::set('module_srl', $module_srl); // Extract admin ID set in the current module diff --git a/modules/module/tpl/module_grants.html b/modules/module/tpl/module_grants.html index dc4557465..b4da47c59 100644 --- a/modules/module/tpl/module_grants.html +++ b/modules/module/tpl/module_grants.html @@ -58,9 +58,11 @@
From 108da2eac3b53d7d694d2cf90678227a42385af4 Mon Sep 17 00:00:00 2001 From: Waterticket Date: Fri, 4 Jul 2025 18:44:01 +0900 Subject: [PATCH 08/17] =?UTF-8?q?=EC=9E=90=EC=8B=A0=EC=9D=84=20=EC=B0=B8?= =?UTF-8?q?=EC=A1=B0=ED=95=98=EB=8A=94=20=EC=99=B8=EB=9E=98=ED=82=A4?= =?UTF-8?q?=EB=8A=94=20=EC=83=9D=EC=84=B1=20=EC=88=9C=EC=84=9C=EC=97=90=20?= =?UTF-8?q?=EC=98=81=ED=96=A5=EC=9D=84=20=EC=A3=BC=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD=20#2576?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/framework/parsers/DBTableParser.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/framework/parsers/DBTableParser.php b/common/framework/parsers/DBTableParser.php index cbd50ea55..50874a7d8 100644 --- a/common/framework/parsers/DBTableParser.php +++ b/common/framework/parsers/DBTableParser.php @@ -304,7 +304,13 @@ class DBTableParser extends BaseParser if ($constraint->references) { $ref = explode('.', $constraint->references); - $info->refs[] = $ref[0]; + $reference_table_name = $ref[0]; + if ($reference_table_name === $table_name) + { + continue; // Ignore self-references. + } + + $info->refs[] = $reference_table_name; } } $ref_list[$table_name] = $info; @@ -328,7 +334,6 @@ class DBTableParser extends BaseParser } } } - $k++; } if (!$changed) { From 04b24bb0d16b5edceb4f0b2c02ce2df6cd79a2c7 Mon Sep 17 00:00:00 2001 From: Waterticket Date: Sun, 6 Jul 2025 02:49:25 +0900 Subject: [PATCH 09/17] =?UTF-8?q?Fix:=20=ED=95=9C=EA=B5=AD=20MX=20?= =?UTF-8?q?=EB=A0=88=EC=BD=94=EB=93=9C=20=EA=B2=80=EC=A6=9D=EC=8B=9C=20?= =?UTF-8?q?=EB=8F=84=EB=A9=94=EC=9D=B8=EC=9D=B4=20=EC=95=84=EB=8B=8C=20MX?= =?UTF-8?q?=20=EB=A0=88=EC=BD=94=EB=93=9C=EC=9D=98=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=ED=94=BC=EB=A1=9C=20=EA=B2=80=EC=A6=9D=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/framework/Korea.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/framework/Korea.php b/common/framework/Korea.php index 774cda049..b7d57089d 100644 --- a/common/framework/Korea.php +++ b/common/framework/Korea.php @@ -349,7 +349,7 @@ class Korea return self::$_domain_cache[$domain] = false; } } - foreach (self::_getDNSRecords($domain, \DNS_A) as $mx_ip) + foreach (self::_getDNSRecords($mx, \DNS_A) as $mx_ip) { return self::$_domain_cache[$domain] = self::isKoreanIP($mx_ip); } From 94869286ce9d76a6e39a4f6435e8100b265e7d59 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 6 Jul 2025 17:06:52 +0900 Subject: [PATCH 10/17] Fix missing category_srl in updateDocument return value #2575 --- modules/document/document.controller.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 4c281b0d4..b4d64844d 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -944,8 +944,8 @@ class DocumentController extends Document { $this->addGrant($obj->document_srl); } - $output->add('document_srl',$obj->document_srl); - $output->add('category_srl',$obj->category_srl); + $output->add('document_srl', $obj->document_srl); + $output->add('category_srl', $obj->category_srl); return $output; } @@ -1392,7 +1392,8 @@ class DocumentController extends Document // Remove the thumbnail file Rhymix\Framework\Storage::deleteDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($obj->document_srl, 3))); - $output->add('document_srl',$obj->document_srl); + $output->add('document_srl', $obj->document_srl); + $output->add('category_srl', $obj->category_srl); //remove from cache self::clearDocumentCache($obj->document_srl); From bd8de66c78e66157aa9d13022cde0169ef1a3ee6 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 6 Jul 2025 17:16:19 +0900 Subject: [PATCH 11/17] Fix incorrect category selected by default when editing a document and a default category is set --- modules/board/m.skins/default/write_form.html | 9 +++++---- modules/board/m.skins/simpleGray/write_form.html | 9 +++++---- modules/board/skins/default/write_form.html | 6 ++++-- modules/board/skins/xedition/write_form.html | 6 ++++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/modules/board/m.skins/default/write_form.html b/modules/board/m.skins/default/write_form.html index b4105219f..7283326e2 100644 --- a/modules/board/m.skins/default/write_form.html +++ b/modules/board/m.skins/default/write_form.html @@ -19,11 +19,12 @@
  • diff --git a/modules/board/m.skins/simpleGray/write_form.html b/modules/board/m.skins/simpleGray/write_form.html index fec0b3118..991f81a06 100644 --- a/modules/board/m.skins/simpleGray/write_form.html +++ b/modules/board/m.skins/simpleGray/write_form.html @@ -14,11 +14,12 @@
  • diff --git a/modules/board/skins/default/write_form.html b/modules/board/skins/default/write_form.html index b6582ae79..65bc195de 100644 --- a/modules/board/skins/default/write_form.html +++ b/modules/board/skins/default/write_form.html @@ -6,9 +6,11 @@
    diff --git a/modules/board/skins/xedition/write_form.html b/modules/board/skins/xedition/write_form.html index a8c3de8d7..34bde1a00 100644 --- a/modules/board/skins/xedition/write_form.html +++ b/modules/board/skins/xedition/write_form.html @@ -6,9 +6,11 @@
    From 4b26a67ca09ae6277278e08b5e99c0a1fc489042 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 6 Jul 2025 17:28:10 +0900 Subject: [PATCH 12/17] Fix blank screen when editing article page with admin layout #2577 --- modules/page/page.admin.view.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/page/page.admin.view.php b/modules/page/page.admin.view.php index 7a58172c6..f78ee30c6 100644 --- a/modules/page/page.admin.view.php +++ b/modules/page/page.admin.view.php @@ -296,7 +296,10 @@ class PageAdminView extends Page Context::set('oDocument', $oDocument); Context::set('mid', $this->module_info->mid); - $this->setLayoutAndTemplatePaths($isMobile ? 'M' : 'P', $this->module_info); + if(config('view.manager_layout') !== 'admin') + { + $this->setLayoutAndTemplatePaths($isMobile ? 'M' : 'P', $this->module_info); + } $skin_path = rtrim($this->getTemplatePath(), '/') . '/'; if (file_exists($skin_path . 'content_modify.blade.php') || file_exists($skin_path . 'content_modify.html')) { From 901f565a8167e239029ec017302002a893e31ea3 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 6 Jul 2025 17:31:13 +0900 Subject: [PATCH 13/17] Restore backward compatible behavior when an ajax form submission returns both a message and a redirect URL --- common/js/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/js/common.js b/common/js/common.js index 728085456..7504be4ad 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -614,7 +614,7 @@ Rhymix.ajaxForm = function(form, callback_success, callback_error) { } else { callback_success = function(data) { if (data.message && data.message !== 'success') { - alert(data.message); + rhymix_alert(data.message, data.redirect_url); } if (data.redirect_url) { Rhymix.redirectToUrl(data.redirect_url.replace(/&/g, '&')); From b5a22b2aa873f4cda50da840be6919a1db43db1e Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 12 Jul 2025 12:18:45 +0900 Subject: [PATCH 14/17] Prepare for array_first() and array_last() becoming available in PHP 8.5 https://wiki.php.net/rfc/array_first_last --- common/functions.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/common/functions.php b/common/functions.php index 72b3e9e5b..7bb4911cf 100644 --- a/common/functions.php +++ b/common/functions.php @@ -56,9 +56,12 @@ function lang(?string $code, $value = null) * @param array $array The input array * @return mixed */ -function array_first(array $array) +if (!function_exists('array_first')) { - return reset($array); + function array_first(array $array) + { + return reset($array); + } } /** @@ -79,9 +82,12 @@ function array_first_key(array $array) * @param array $array The input array * @return mixed */ -function array_last(array $array) +if (!function_exists('array_last')) { - return end($array); + function array_last(array $array) + { + return end($array); + } } /** From 1c92b1baf595ebdb918eddcd88316fefd2628d3c Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 12 Jul 2025 12:20:20 +0900 Subject: [PATCH 15/17] Use array_key_first() and array_key_last() internally --- common/functions.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/functions.php b/common/functions.php index 7bb4911cf..84b923681 100644 --- a/common/functions.php +++ b/common/functions.php @@ -72,8 +72,7 @@ if (!function_exists('array_first')) */ function array_first_key(array $array) { - reset($array); - return key($array); + return array_key_first($array); } /** @@ -98,8 +97,7 @@ if (!function_exists('array_last')) */ function array_last_key(array $array) { - end($array); - return key($array); + return array_key_last($array); } /** From 4193edde2584eb4305fa8575b07afb13aa306b47 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 12 Jul 2025 12:24:20 +0900 Subject: [PATCH 16/17] Replce array_first_key() with array_key_first(), etc. --- common/framework/Mail.php | 2 +- common/framework/Password.php | 2 +- common/framework/Router.php | 2 +- common/framework/drivers/mail/brevo.php | 8 ++++---- common/framework/drivers/mail/sendgrid.php | 4 ++-- modules/admin/tpl/config_notification.html | 2 +- modules/advanced_mailer/advanced_mailer.controller.php | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/common/framework/Mail.php b/common/framework/Mail.php index 72c226c95..00851a749 100644 --- a/common/framework/Mail.php +++ b/common/framework/Mail.php @@ -585,7 +585,7 @@ class Mail // Reset Message-ID in case send() is called multiple times. $random = substr(hash('sha256', mt_rand() . microtime() . getmypid()), 0, 32); $sender = $this->message->getFrom(); - $sender_email = strval(array_first_key($sender)); + $sender_email = strval(array_key_first($sender)); $id = $random . '@' . (preg_match('/^(.+)@([^@]+)$/', $sender_email, $matches) ? $matches[2] : 'swift.generated'); $this->message->getHeaders()->get('Message-ID')->setId($id); diff --git a/common/framework/Password.php b/common/framework/Password.php index 3182557fb..feb1943ec 100644 --- a/common/framework/Password.php +++ b/common/framework/Password.php @@ -112,7 +112,7 @@ class Password { unset($algos['argon2id']); } - return array_first_key($algos); + return array_key_first($algos); } /** diff --git a/common/framework/Router.php b/common/framework/Router.php index 021449f90..29931b635 100644 --- a/common/framework/Router.php +++ b/common/framework/Router.php @@ -608,7 +608,7 @@ class Router return false; } arsort($reordered_routes); - $best_route = array_first_key($reordered_routes); + $best_route = array_key_first($reordered_routes); return $best_route; } } diff --git a/common/framework/drivers/mail/brevo.php b/common/framework/drivers/mail/brevo.php index 4fe4625ff..613b0309e 100644 --- a/common/framework/drivers/mail/brevo.php +++ b/common/framework/drivers/mail/brevo.php @@ -69,7 +69,7 @@ class Brevo extends Base implements \Rhymix\Framework\Drivers\MailInterface $from = $message->message->getFrom(); $to = $message->message->getTo(); $data = [ - 'sender' => ['email' => array_first_key($from), 'name' => array_first($from)], + 'sender' => ['email' => array_key_first($from), 'name' => array_first($from)], 'to' => array_map($format_callback, array_keys($to), array_values($to)), 'subject' => $message->message->getSubject(), 'htmlContent' => $message->message->getBody(), @@ -84,7 +84,7 @@ class Brevo extends Base implements \Rhymix\Framework\Drivers\MailInterface } if ($reply_to = $message->message->getReplyTo()) { - $data['replyTo'] = ['email' => array_first_key($reply_to)]; + $data['replyTo'] = ['email' => array_key_first($reply_to)]; } foreach ($message->getAttachments() as $attachment) { @@ -93,7 +93,7 @@ class Brevo extends Base implements \Rhymix\Framework\Drivers\MailInterface 'name' => $attachment->display_filename ?: $attachment->cid, ]; } - + // Prepare headers and options for Requests. $headers = [ 'api-key' => $this->_config['api_key'], @@ -103,7 +103,7 @@ class Brevo extends Base implements \Rhymix\Framework\Drivers\MailInterface $options = [ 'timeout' => 8, ]; - + // Send the API request. $request = \Rhymix\Framework\HTTP::post(self::$_url, $data, $headers, [], $options); $status_code = $request->getStatusCode(); diff --git a/common/framework/drivers/mail/sendgrid.php b/common/framework/drivers/mail/sendgrid.php index b135c79bd..8a7d84c96 100644 --- a/common/framework/drivers/mail/sendgrid.php +++ b/common/framework/drivers/mail/sendgrid.php @@ -108,7 +108,7 @@ class SendGrid extends Base implements \Rhymix\Framework\Drivers\MailInterface $from = $message->message->getFrom(); if ($from) { - $data['from']['email'] = array_first_key($from); + $data['from']['email'] = array_key_first($from); if (array_first($from)) { $data['from']['name'] = array_first($from); @@ -119,7 +119,7 @@ class SendGrid extends Base implements \Rhymix\Framework\Drivers\MailInterface $replyTo = $message->message->getReplyTo(); if ($replyTo) { - $data['reply_to']['email'] = array_first_key($from); + $data['reply_to']['email'] = array_key_first($from); } // Set the subject. diff --git a/modules/admin/tpl/config_notification.html b/modules/admin/tpl/config_notification.html index e09062d6c..c3cc37685 100644 --- a/modules/admin/tpl/config_notification.html +++ b/modules/admin/tpl/config_notification.html @@ -220,7 +220,7 @@ {@ $conf_exists = config("sms.$driver_name.api_key")}
    diff --git a/modules/advanced_mailer/advanced_mailer.controller.php b/modules/advanced_mailer/advanced_mailer.controller.php index 904822dcd..11679d716 100644 --- a/modules/advanced_mailer/advanced_mailer.controller.php +++ b/modules/advanced_mailer/advanced_mailer.controller.php @@ -18,7 +18,7 @@ class Advanced_MailerController extends Advanced_Mailer $recipients = $mail->message->getTo() ?: array(); if ($recipients) { - $first_recipient = array_first_key($recipients); + $first_recipient = array_key_first($recipients); if ($exception_driver = $this->getSendingMethodForEmailAddress($first_recipient, $config)) { $driver_class = '\\Rhymix\\Framework\\Drivers\Mail\\' . $exception_driver; @@ -51,7 +51,7 @@ class Advanced_MailerController extends Advanced_Mailer else { $sender = $mail->message->getFrom(); - $original_sender_email = $sender ? array_first_key($sender) : null; + $original_sender_email = $sender ? array_key_first($sender) : null; $original_sender_name = $sender ? array_first($sender) : null; list($default_from, $default_name) = $this->getDefaultEmailIdentity(); if ($original_sender_email !== $default_from && $default_from) From 9d98e47c53b550ddd2e3b4605473613970ad9ecc Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 12 Jul 2025 20:30:15 +0900 Subject: [PATCH 17/17] Try one more time before throwing error on template cache file write --- common/framework/Template.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/framework/Template.php b/common/framework/Template.php index f5919beab..105da4fa6 100644 --- a/common/framework/Template.php +++ b/common/framework/Template.php @@ -368,7 +368,10 @@ class Template $content = $this->parse(); if (!Storage::write($this->cache_path, $content)) { - throw new Exception('Cannot write template cache file: ' . $this->cache_path); + if (!Storage::write($this->cache_path, $content)) + { + throw new Exception('Cannot write template cache file: ' . $this->cache_path); + } } }