This commit is contained in:
祁宁 2014-05-23 14:45:44 +08:00
parent 13f6adad4d
commit c6a468fdcb

View File

@ -516,7 +516,7 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion);
$lines[] = "
/** 定义数据库参数 */
\$db = new Typecho_Db('{$adapter}', '" . _r('dbPrefix') . "');
\$db->addServer(" . (!isset($config) ? var_export($dbConfig, true) : $config) . ", Typecho_Db::READ | Typecho_Db::WRITE);
\$db->addServer(" . (empty($config) ? var_export($dbConfig, true) : $config) . ", Typecho_Db::READ | Typecho_Db::WRITE);
Typecho_Db::set(\$db);
";
$contents = implode('', $lines);