From 5f8586ec8f6f7bbb3faa487f9fc42452429a978f Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 4 Sep 2025 21:31:09 +0900 Subject: [PATCH] Fix empty values being set to 0 when module point config is modified --- modules/point/point.admin.controller.php | 69 +++++++++++++++------- modules/point/tpl/point_module_config.html | 33 +++++------ 2 files changed, 64 insertions(+), 38 deletions(-) diff --git a/modules/point/point.admin.controller.php b/modules/point/point.admin.controller.php index f5721015d..2176023f3 100644 --- a/modules/point/point.admin.controller.php +++ b/modules/point/point.admin.controller.php @@ -231,32 +231,59 @@ class PointAdminController extends Point function procPointAdminInsertPointModuleConfig() { $module_srl = Context::get('target_module_srl'); - if(!$module_srl) throw new Rhymix\Framework\Exceptions\InvalidRequest; + if (!$module_srl) + { + throw new Rhymix\Framework\Exceptions\InvalidRequest; + } + // In case of batch configuration of several modules - if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl); - else $module_srl = array($module_srl); + if (preg_match('/^([0-9,]+)$/',$module_srl)) + { + $module_srl = explode(',',$module_srl); + } + else + { + $module_srl = array($module_srl); + } + // Save configurations $oModuleController = getController('module'); for($i=0;$iinsertModulePartConfig('point', $srl, $config); } diff --git a/modules/point/tpl/point_module_config.html b/modules/point/tpl/point_module_config.html index 2461a319c..d35a7e4f1 100644 --- a/modules/point/tpl/point_module_config.html +++ b/modules/point/tpl/point_module_config.html @@ -1,101 +1,100 @@

{$lang->point}

-
- +
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}
- {$module_config['point_name']} + {$module_config['point_name']}