This commit is contained in:
tanghucheng
2022-06-30 17:26:57 +08:00
parent 70a58529fe
commit 78608484b7
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -194,6 +194,8 @@ class settingModel extends model
->fetchAll('id');
if(!$records) return array();
$vision = $this->config->vision;
/* Group records by owner and module. */
$config = array();
foreach($records as $record)
@@ -202,6 +204,9 @@ class settingModel extends model
if(!isset($record->module)) return array(); // If no module field, return directly. Since 3.2 version, there's the module field.
if(empty($record->module)) continue;
/* If it`s lite vision unset config requiredFields */
if($vision == 'lite' and $record->key == 'requiredFields' and $record->vision == '') continue;
$config[$record->owner]->{$record->module}[] = $record;
}
return $config;