diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fb498d..348bdf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # DiliCMS更新日志 +## 版本号 2.1.3 + +> 2013年8月15日 更新内容 + +- 1.增加数据库配置模板文件,解决由于文件污染导致的卡在管理员设置处 + ## 版本号 2.1.2 > 2013年8月10日 更新内容 diff --git a/admin/config/database.php b/admin/config/database.php index 834aad9..5b9c1a8 100755 --- a/admin/config/database.php +++ b/admin/config/database.php @@ -58,7 +58,7 @@ $db['default']['password'] = 'root'; $db['default']['database'] = 'dilicms'; $db['default']['dbdriver'] = 'mysql'; -$db['default']['dbprefix'] = 'dili_'; +$db['default']['dbprefix'] = 'cd_'; $db['default']['pconnect'] = FALSE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; diff --git a/admin/config/database_template.php b/admin/config/database_template.php new file mode 100755 index 0000000..6191882 --- /dev/null +++ b/admin/config/database_template.php @@ -0,0 +1,95 @@ +load->library('platform'); +} + +$active_group = get_instance()->platform->get_type(); +$active_record = TRUE; + +$db['default']['hostname'] = '{HOSTNAME}'; +$db['default']['username'] = '{USERNAME}'; +$db['default']['password'] = '{PASSWORD}'; +$db['default']['database'] = '{DATABASE}'; +$db['default']['dbdriver'] = 'mysql'; +$db['default']['dbprefix'] = '{PREFIX}'; +$db['default']['pconnect'] = FALSE; +$db['default']['db_debug'] = TRUE; +$db['default']['cache_on'] = FALSE; +$db['default']['cachedir'] = ''; +$db['default']['char_set'] = 'utf8'; +$db['default']['dbcollat'] = 'utf8_general_ci'; +$db['default']['swap_pre'] = ''; +$db['default']['autoinit'] = TRUE; +$db['default']['stricton'] = FALSE; + +if ($active_group == 'sae') +{ + //SAE数据库设置 + $db['sae']['hostname'] = SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT; + $db['sae']['username'] = SAE_MYSQL_USER; + $db['sae']['password'] = SAE_MYSQL_PASS; + $db['sae']['database'] = SAE_MYSQL_DB; + $db['sae']['dbdriver'] = 'mysql'; + $db['sae']['dbprefix'] = 'dili_'; + $db['sae']['pconnect'] = FALSE; + $db['sae']['db_debug'] = TRUE; + $db['sae']['cache_on'] = FALSE; + $db['sae']['cachedir'] = ''; + $db['sae']['char_set'] = 'utf8'; + $db['sae']['dbcollat'] = 'utf8_general_ci'; + $db['sae']['swap_pre'] = ''; + $db['sae']['autoinit'] = TRUE; + $db['sae']['stricton'] = FALSE; +} + + + +/* End of file database.php */ +/* Location: ./application/config/database.php */ diff --git a/application/config/database.php b/application/config/database.php index 834aad9..5b9c1a8 100755 --- a/application/config/database.php +++ b/application/config/database.php @@ -58,7 +58,7 @@ $db['default']['password'] = 'root'; $db['default']['database'] = 'dilicms'; $db['default']['dbdriver'] = 'mysql'; -$db['default']['dbprefix'] = 'dili_'; +$db['default']['dbprefix'] = 'cd_'; $db['default']['pconnect'] = FALSE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; diff --git a/install/config/database.php b/install/config/database.php index fb6ce20..edb3d8e 100755 --- a/install/config/database.php +++ b/install/config/database.php @@ -58,7 +58,7 @@ $db['default']['password'] = 'root'; $db['default']['database'] = 'dilicms'; $db['default']['dbdriver'] = 'mysql'; -$db['default']['dbprefix'] = 'dili_'; +$db['default']['dbprefix'] = 'cd_'; $db['default']['pconnect'] = FALSE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; diff --git a/install/controllers/install.php b/install/controllers/install.php index 32853fb..b3c8b28 100644 --- a/install/controllers/install.php +++ b/install/controllers/install.php @@ -100,7 +100,7 @@ public function database() { $search_array = array('{HOSTNAME}', '{USERNAME}', '{PASSWORD}', '{DATABASE}', '{PREFIX}'); $replace_array = array($config['hostname'], $config['username'], $config['password'], $config['database'], $config['dbprefix']); - $database_config = str_replace($search_array, $replace_array, @file_get_contents(BASEPATH.'../admin/config/database.php')); + $database_config = str_replace($search_array, $replace_array, @file_get_contents(BASEPATH.'../admin/config/database_template.php')); @file_put_contents(BASEPATH.'../admin/config/database.php', $database_config); @file_put_contents(BASEPATH.'../application/config/database.php', $database_config); $database_config = str_replace("get_instance()->platform->get_type()", "PLATFORM", $database_config); diff --git a/install/public/static/js/templates/complete.html b/install/public/static/js/templates/complete.html index f50ca8b..5bc0e47 100644 --- a/install/public/static/js/templates/complete.html +++ b/install/public/static/js/templates/complete.html @@ -31,6 +31,12 @@

交流经验

+
  • +
    +

    使用说明(部分)

    +

    点此进入

    +
    +
  • 管理后台

    diff --git a/shared/config/constant.php b/shared/config/constant.php index e49ea09..9bca037 100755 --- a/shared/config/constant.php +++ b/shared/config/constant.php @@ -11,7 +11,7 @@ define('IN_DILICMS', TRUE); - define('DILICMS_VERSION', 'V2.1.1'); + define('DILICMS_VERSION', 'V2.1.3'); define('DILICMS_SHARE_PATH', BASEPATH . '../shared/');