Merge branch '12.x'
This commit is contained in:
@@ -365,7 +365,8 @@ class baseHelper
|
||||
}
|
||||
|
||||
/* Check decrypted password. Judge whether there is garbled code. */
|
||||
if(json_encode($decryptedPassword) === 'null') $decryptedPassword = '';
|
||||
$jsoned = json_encode($decryptedPassword);
|
||||
if($jsoned === 'null' or empty($jsoned)) $decryptedPassword = '';
|
||||
}
|
||||
if(empty($decryptedPassword)) $decryptedPassword = $password;
|
||||
|
||||
|
||||
@@ -259,12 +259,13 @@ class baseModel
|
||||
if(!empty($moduleExtPath['site'])) $extensionFile = $moduleExtPath['site'] . 'class/' . $extensionName . '.class.php';
|
||||
if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['common'] . 'class/' . $extensionName . '.class.php';
|
||||
|
||||
/* 设置扩展类的名字。Set the extension class name. */
|
||||
$extensionClass = $extensionName . ucfirst($moduleName);
|
||||
if(isset($this->$extensionClass)) return $this->$extensionClass;
|
||||
|
||||
/* 载入父类。Try to import parent model file auto and then import the extension file. */
|
||||
if(!class_exists($moduleName . 'Model')) helper::import($this->app->getModulePath($this->appName, $moduleName) . 'model.php');
|
||||
if(!helper::import($extensionFile)) return false;
|
||||
|
||||
/* 设置扩展类的名字。Set the extension class name. */
|
||||
$extensionClass = $extensionName . ucfirst($moduleName);
|
||||
if(!class_exists($extensionClass)) return false;
|
||||
|
||||
/* 实例化扩展类。Create an instance of the extension class and return it. */
|
||||
|
||||
@@ -831,6 +831,7 @@ class baseRouter
|
||||
{
|
||||
$sessionName = $this->config->sessionVar;
|
||||
session_name($sessionName);
|
||||
session_set_cookie_params(0, $this->config->webRoot);
|
||||
if($this->config->customSession) session_save_path($this->getTmpRoot() . 'session');
|
||||
session_start();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user