mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 02:14:13 +00:00
ENV is taken instead of SERVER for Environment
This commit is contained in:
@@ -54,8 +54,8 @@
|
|||||||
* NOTE: If you change these, also change the error_reporting() code below
|
* NOTE: If you change these, also change the error_reporting() code below
|
||||||
*/
|
*/
|
||||||
#define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
|
#define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
|
||||||
if (isset($_SERVER['CI_ENV'])) {
|
if (isset($_ENV['CI_ENV'])) {
|
||||||
define('ENVIRONMENT', $_SERVER['CI_ENV']);
|
define('ENVIRONMENT', $_ENV['CI_ENV']);
|
||||||
} else if (file_exists('.debug')) {
|
} else if (file_exists('.debug')) {
|
||||||
define('ENVIRONMENT', 'development');
|
define('ENVIRONMENT', 'development');
|
||||||
} else if (file_exists('.maintenance')) {
|
} else if (file_exists('.maintenance')) {
|
||||||
|
|||||||
@@ -111,9 +111,9 @@ class Core
|
|||||||
|
|
||||||
$template_path = 'config/database.php';
|
$template_path = 'config/database.php';
|
||||||
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/config/database.php';
|
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/config/database.php';
|
||||||
if (isset($_SERVER['CI_ENV'])) {
|
if (isset($_ENV['CI_ENV'])) {
|
||||||
$template_path = $_SERVER['CI_ENV'].'/database.php';
|
$template_path = $_ENV['CI_ENV'].'/database.php';
|
||||||
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/'.$_SERVER['CI_ENV'].'/database.php';
|
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/'.$_ENV['CI_ENV'].'/database.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open the file
|
// Open the file
|
||||||
@@ -153,9 +153,9 @@ class Core
|
|||||||
|
|
||||||
$template_path = 'config/config.php';
|
$template_path = 'config/config.php';
|
||||||
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/config/config.php';
|
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/config/config.php';
|
||||||
if (isset($_SERVER['CI_ENV'])) {
|
if (isset($_ENV['CI_ENV'])) {
|
||||||
$template_path = $_SERVER['CI_ENV'].'/config.php';
|
$template_path = $_ENV['CI_ENV'].'/config.php';
|
||||||
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/'.$_SERVER['CI_ENV'].'/config.php';
|
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/'.$_ENV['CI_ENV'].'/config.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open the file
|
// Open the file
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ if (file_exists('config_unattended.php')) {
|
|||||||
|
|
||||||
// Config Paths
|
// Config Paths
|
||||||
$db_config_path = '../application/config/';
|
$db_config_path = '../application/config/';
|
||||||
if (isset($_SERVER['CI_ENV'])) {
|
if (isset($_ENV['CI_ENV'])) {
|
||||||
$db_config_path ='../application/'.$_SERVER['CI_ENV'].'/';
|
$db_config_path ='../application/'.$_ENV['CI_ENV'].'/';
|
||||||
}
|
}
|
||||||
$db_file_path = $db_config_path . "database.php";
|
$db_file_path = $db_config_path . "database.php";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user