+ framework: return if the module's config has been loaded.

This commit is contained in:
liugang
2024-04-26 17:23:26 +08:00
parent e7d4092c6a
commit a65ce41ef7
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -2784,6 +2784,10 @@ class baseRouter
*/
public function loadModuleConfig(string $moduleName, string $appName = '')
{
if(isset(self::$loadedConfigs[$moduleName])) return false;
self::$loadedConfigs[$moduleName] = $moduleName;
global $config;
if($config and (!isset($config->$moduleName) or !is_object($config->$moduleName))) $config->$moduleName = new stdclass();
+4
View File
@@ -393,6 +393,10 @@ class router extends baseRouter
*/
public function loadModuleConfig($moduleName, $appName = '')
{
if(isset(self::$loadedConfigs[$moduleName])) return false;
self::$loadedConfigs[$moduleName] = $moduleName;
$extConfigPath = array();
global $config;
if($config and (!isset($config->$moduleName) or !is_object($config->$moduleName))) $config->$moduleName = new stdclass();