From 3387bf56e3a2f433a1458159c651cd8663d2ace8 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 3 Mar 2023 13:03:53 +0800 Subject: [PATCH] * Code for finish task 84527. --- module/custom/model.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/custom/model.php b/module/custom/model.php index b9bbcd1e00..af592282a0 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -56,9 +56,11 @@ class customModel extends model if(strpos($customLang->section, 'featureBar-') !== false) { $sections = explode('-', $customLang->section); + $firstKey = $sections[0]; $sectionIndex = count($sections) - 1; $sectionArr = array($customLang->key => $customLang->value); $oldSectionArr = empty($processedLang[$customLang->module]) ? array() : $processedLang[$customLang->module]; + $oldFeatureBar = empty($oldSectionArr[$firstKey]) ? array() : $oldSectionArr[$firstKey]; if(!empty($oldSectionArr)) { for($i = 0; $i <= $sectionIndex; $i ++) @@ -70,6 +72,7 @@ class customModel extends model } for($index = $sectionIndex; $index >= 0; $index --) $sectionArr = array($sections[$index] => $sectionArr); + $sectionArr[$firstKey] = array_merge($oldFeatureBar, $sectionArr[$firstKey]); $processedLang[$customLang->module] = $sectionArr; } else