From fc99d01af94df79e3fedf363b4e4f9735a0a9d5e Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 27 Feb 2023 16:09:06 +0800 Subject: [PATCH] * Fixed Save labels clearing other labels. --- module/custom/model.php | 2 +- module/dev/control.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/custom/model.php b/module/custom/model.php index 1e273478a5..79b0de8cc0 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -64,7 +64,7 @@ class customModel extends model for($i = 0; $i <= $sectionIndex; $i ++) { $sectionKey = $sections[$i]; - $oldSectionArr = $oldSectionArr[$sectionKey]; + $oldSectionArr = isset($oldSectionArr[$sectionKey]) ? $oldSectionArr[$sectionKey] : array(); } $sectionArr = array_merge($oldSectionArr, $sectionArr); } diff --git a/module/dev/control.php b/module/dev/control.php index 315881e84e..74b3091f51 100644 --- a/module/dev/control.php +++ b/module/dev/control.php @@ -128,7 +128,7 @@ class dev extends control if($this->server->request_method == 'POST') { - $this->dev->saveCustomedLang($common, $moduleName, $method, $language); + $this->dev->saveCustomedLang($type, $moduleName, $method, $language); return $this->send(array('result' => 'success', 'locate' => 'reload', 'message' => $this->lang->saveSuccess)); }