Skip to content

Commit

Permalink
Merge pull request typecho#714 from mierhuo/master
Browse files Browse the repository at this point in the history
delete some redundant code in file install.php(config.inc.php as well)
  • Loading branch information
joyqi authored Mar 8, 2018
2 parents 1e0b2bc + 4ce7490 commit 09d9c3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
23 changes: 1 addition & 22 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,6 @@
/** 载入API支持 */
require_once 'Typecho/Common.php';

/** 载入Response支持 */
require_once 'Typecho/Response.php';

/** 载入配置支持 */
require_once 'Typecho/Config.php';

/** 载入异常支持 */
require_once 'Typecho/Exception.php';

/** 载入插件支持 */
require_once 'Typecho/Plugin.php';

/** 载入国际化支持 */
require_once 'Typecho/I18n.php';

/** 载入数据库支持 */
require_once 'Typecho/Db.php';

/** 载入路由器支持 */
require_once 'Typecho/Router.php';

/** 程序初始化 */
Typecho_Common::init();

Expand Down Expand Up @@ -558,7 +537,7 @@ function _u() {
}

/** 初始化配置文件 */
$lines = array_slice(file(__FILE__), 1, 52);
$lines = array_slice(file(__FILE__), 1, 31);
$lines[] = "
/** 定义数据库参数 */
\$db = new Typecho_Db('{$adapter}', '" . _r('dbPrefix') . "');
Expand Down
3 changes: 3 additions & 0 deletions var/Typecho/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ public static function init()

/** 设置异常截获函数 */
set_exception_handler(array('Typecho_Common', 'exceptionHandle'));

/** 载入国际化支持 */
require_once 'Typecho/I18n.php';
}

/**
Expand Down

0 comments on commit 09d9c3a

Please sign in to comment.