From: shizuki Date: Tue, 17 Mar 2009 09:01:31 +0000 (+0000) Subject: インストールスクリプトを統合 X-Git-Tag: release-3-50~50 X-Git-Url: http://git.sourceforge.jp/view?p=nucleus-jp%2Fnucleus-jp-ancient.git;a=commitdiff_plain;h=bd4845999c89532571b8a383b6345eef7945da44;ds=sidebyside インストールスクリプトを統合 $CONF['DisableEncodingCheck'] の設定をコメントアウト git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@982 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- diff --git a/utf8/install.php b/utf8/install.php index c6d51bf..95e6bdb 100755 --- a/utf8/install.php +++ b/utf8/install.php @@ -30,7 +30,7 @@ -- Start Of Configurable Part -- */ -include('./install_lang_japanese-utf8.php'); +include('./install_lang_japanese.php'); // array with names of plugins to install. Plugin files must be present in the nucleus/plugin/ // directory. @@ -93,7 +93,7 @@ function showInstallForm() { - + <?php echo _TITLE; ?> diff --git a/utf8/install_lang_japanese-utf8.php b/utf8/install_lang_japanese.php similarity index 97% rename from utf8/install_lang_japanese-utf8.php rename to utf8/install_lang_japanese.php index 7cdb59c..0b792b5 100644 --- a/utf8/install_lang_japanese-utf8.php +++ b/utf8/install_lang_japanese.php @@ -15,7 +15,10 @@ * @copyright Copyright (C) 2002-2009 The Nucleus Group * @version $Id$ */ -define('_CHARSET', 'UTF-8'); +define('_HEADER1_2', '使用するキャラクタセット'); +define('_TEXT1_2', 'NucleusCMSで使用するキャラクタセットを選択します。「UTF-8」か「EUC-JP」かを、セレクトボックスから選択してください。'); +define('_TEXT1_2_TAB_HEAD', 'キャラクタセットの選択'); +define('_TEXT1_2_TAB_FIELD1', 'キャラクタセット'); define('_ERROR1', '使用中のPHPはMySQLをサポートしていません :('); define('_ERROR2', 'データベース名が見つかりません'); diff --git a/utf8/nucleus/libs/globalfunctions.php b/utf8/nucleus/libs/globalfunctions.php index 1c109c2..421763c 100755 --- a/utf8/nucleus/libs/globalfunctions.php +++ b/utf8/nucleus/libs/globalfunctions.php @@ -518,6 +518,18 @@ function sql_connect() { $MYSQL_CONN = @mysql_connect($MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWORD) or startUpError('

Could not connect to MySQL database.

', 'Connect Error'); mysql_select_db($MYSQL_DATABASE) or startUpError('

Could not select database: ' . mysql_error() . '

', 'Connect Error'); +/*/ + $resource = sql_query("show variables LIKE 'character_set_database'"); + $fetchDat = mysql_fetch_assoc($resource); + $charset = $fetchDat['Value']; + $mySqlVer = implode('.', array_map('intval', explode('.', mysql_get_server_info($MYSQL_CONN)))); + if ($mySqlVer >= '5.0.7' && phpversion() >= '5.2.3') { + mysql_set_charset($charset); + } else { + sql_query("SET NAMES " . $charset); + } +// */ + return $MYSQL_CONN; } @@ -1550,7 +1562,7 @@ function encoding_check($val, $key, $encoding=false, $exclude=false) { Don't set this permanently in nucleus_config table. */ global $CONF; - if (!empty($CONF['DisableEncodingCheck'])) return true; +// if (!empty($CONF['DisableEncodingCheck'])) return true; /* When 3rd argument is set, return if checked already. When 4th argument is set, set the excluded key(s).