修正由于GAE的MySQL连接参数变化导致的安装失败问题
This commit is contained in:
+2
-2
@@ -358,9 +358,8 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion);
|
||||
|
||||
/** 初始用户 */
|
||||
$password = empty($config['userPassword']) ? substr(uniqid(), 7) : $config['userPassword'];
|
||||
$hasher = new PasswordHash(8, true);
|
||||
|
||||
$installDb->query($installDb->insert('table.users')->rows(array('name' => $config['userName'], 'password' => $hasher->HashPassword($password), 'mail' => $config['userMail'],
|
||||
$installDb->query($installDb->insert('table.users')->rows(array('name' => $config['userName'], 'password' => Typecho_Common::hash($password), 'mail' => $config['userMail'],
|
||||
'url' => 'http://www.typecho.org', 'screenName' => $config['userName'], 'group' => 'administrator', 'created' => Typecho_Date::gmtTime())));
|
||||
|
||||
unset($_SESSION['typecho']);
|
||||
@@ -472,6 +471,7 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion);
|
||||
}
|
||||
|
||||
$config = str_replace($replace, array_values($dbConfig), _r('config'));
|
||||
$dbConfig['dsn'] = str_replace($replace, array_values($dbConfig), $dbConfig['dsn']);
|
||||
}
|
||||
|
||||
if (!isset($config) && $success && !_r('created')) {
|
||||
|
||||
Reference in New Issue
Block a user