* Fix bug of load zen and tao.

This commit is contained in:
Guan Xiying
2022-10-18 17:19:18 +08:00
parent 8d961926a4
commit 01ac19f6e5
2 changed files with 9 additions and 10 deletions
+3 -6
View File
@@ -31,12 +31,9 @@ class model extends baseModel
{
parent::__construct($appName);
$className = get_class($this);
if(strtolower(substr($className, -5)) == 'model')
{
$moduleName = $this->app->getModuleName();
$this->loadModel($moduleName, $appName, 'tao');
}
$className = strtolower(get_class($this));
$moduleName = $this->app->getModuleName();
if($className == $moduleName . 'model' || $className == 'ext' . $moduleName . 'model') $this->loadModel($moduleName, $appName, 'tao');
}
/**