* Revert the loadModel function.

This commit is contained in:
Guan Xiying
2022-10-26 11:07:19 +08:00
parent 59ff8af5e6
commit 646e61e3db
2 changed files with 4 additions and 23 deletions
+2 -5
View File
@@ -33,8 +33,6 @@ class control extends baseControl
{
parent::__construct($moduleName, $methodName, $appName);
$this->loadModel($moduleName, $appName, 'zen');
$this->app->setOpenApp();
if(defined('IN_USE') or (defined('RUN_MODE') and RUN_MODE != 'api')) $this->setPreference();
@@ -178,13 +176,12 @@ class control extends baseControl
*
* @param string $moduleName 模块名,如果为空,使用当前模块。The module name, if empty, use current module's name.
* @param string $appName 应用名,如果为空,使用当前应用。The app name, if empty, use current app's name.
* @param string $type 对象的类型,可选值 model、zen、tao,默认为 model。The type of the object, optional values model, zen, tao, the default is model.
* @access public
* @return object|bool 如果没有model文件,返回false,否则返回model对象。If no model file, return false, else return the model object.
*/
public function loadModel($moduleName = '', $appName = '', $type = 'model')
public function loadModel($moduleName = '', $appName = '')
{
return parent::loadModel($moduleName, '', $type);
return parent::loadModel($moduleName);
}
/**