Created
December 8, 2018 08:17
-
-
Save nanasess/451cf6cd9c08b27dc0ca9b0f223d36c8 to your computer and use it in GitHub Desktop.
EC-CUBEの定数を変更する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/data/class/SC_Initial.php b/data/class/SC_Initial.php | |
index aa25b299b2..f57c908dc9 100644 | |
--- a/data/class/SC_Initial.php | |
+++ b/data/class/SC_Initial.php | |
@@ -83,10 +83,10 @@ class SC_Initial | |
*/ | |
public function defineDSN() | |
{ | |
- if (defined('DB_TYPE') && defined('DB_USER') && defined('DB_PASSWORD') | |
- && defined('DB_SERVER') && defined('DB_PORT') && defined('DB_NAME') | |
+ if (defined('DB_TYPE') && defined('EC_DB_USER') && defined('EC_DB_PASSWORD') | |
+ && defined('EC_DB_SERVER') && defined('EC_DB_PORT') && defined('EC_DB_NAME') | |
) { | |
- $dsn = DB_TYPE . '://' . DB_USER . ':' . DB_PASSWORD . '@' . DB_SERVER . ':' . DB_PORT . '/' . DB_NAME; | |
+ $dsn = DB_TYPE . '://' . EC_DB_USER . ':' . EC_DB_PASSWORD . '@' . EC_DB_SERVER . ':' . EC_DB_PORT . '/' . EC_DB_NAME; | |
/** サイト用DB */ | |
// ここで生成した DSN は使用せず, SC_Query のコンストラクタでパラメータを設定する. | |
define('DEFAULT_DSN', $dsn); | |
diff --git a/data/class/SC_Query.php b/data/class/SC_Query.php | |
index 32bed1b153..8c9725e4ed 100644 | |
--- a/data/class/SC_Query.php | |
+++ b/data/class/SC_Query.php | |
@@ -53,12 +53,12 @@ class SC_Query | |
if ($dsn == '') { | |
$dsn = array( | |
'phptype' => DB_TYPE, | |
- 'username' => DB_USER, | |
- 'password' => DB_PASSWORD, | |
+ 'username' => EC_DB_USER, | |
+ 'password' => EC_DB_PASSWORD, | |
'protocol' => 'tcp', | |
- 'hostspec' => DB_SERVER, | |
- 'port' => DB_PORT, | |
- 'database' => DB_NAME, | |
+ 'hostspec' => EC_DB_SERVER, | |
+ 'port' => EC_DB_PORT, | |
+ 'database' => EC_DB_NAME, | |
); | |
} | |
diff --git a/data/class/db/SC_DB_DBFactory.php b/data/class/db/SC_DB_DBFactory.php | |
index 498002b209..0703a2e2ef 100644 | |
--- a/data/class/db/SC_DB_DBFactory.php | |
+++ b/data/class/db/SC_DB_DBFactory.php | |
@@ -66,12 +66,12 @@ class SC_DB_DBFactory | |
if (empty($dsn)) { | |
if (defined('DEFAULT_DSN')) { | |
$dsn = array('phptype' => DB_TYPE, | |
- 'username' => DB_USER, | |
- 'password' => DB_PASSWORD, | |
+ 'username' => EC_DB_USER, | |
+ 'password' => EC_DB_PASSWORD, | |
'protocol' => 'tcp', | |
- 'hostspec' => DB_SERVER, | |
- 'port' => DB_PORT, | |
- 'database' => DB_NAME | |
+ 'hostspec' => EC_DB_SERVER, | |
+ 'port' => EC_DB_PORT, | |
+ 'database' => EC_DB_NAME | |
); | |
} else { | |
return ''; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment