Skip to content

Commit e774be4

Browse files
committed
Path-adjustments
1 parent 2ae8c6e commit e774be4

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

install/includes/core_class.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ function write_config($data) {
112112
$template_path = 'config/database.php';
113113
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/config/database.php';
114114
if (isset($_ENV['CI_ENV'])) {
115-
$template_path = 'config/'.$_ENV['CI_ENV'].'/database.php';
116115
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/config/'.$_ENV['CI_ENV'].'/database.php';
117116
}
118117

@@ -154,7 +153,6 @@ function write_configfile($data) {
154153
$template_path = 'config/config.php';
155154
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/config/config.php';
156155
if (isset($_ENV['CI_ENV'])) {
157-
$template_path = 'config/'.$_ENV['CI_ENV'].'/config.php';
158156
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/config/'.$_ENV['CI_ENV'].'/config.php';
159157
}
160158

install/index.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// Config Paths
2626
$db_config_path = '../application/config/';
2727
if (isset($_ENV['CI_ENV'])) {
28-
$db_config_path ='../application/config/'.$_ENV['CI_ENV'].'/';
28+
$db_config_path ='../application/'.$_ENV['CI_ENV'].'/';
2929
}
3030
$db_file_path = $db_config_path . "database.php";
3131

@@ -115,11 +115,11 @@ function delDir($dir)
115115
} elseif ($database->create_tables($_POST) == false) {
116116
$message = $core->show_message('error', "The database tables could not be created, please verify your settings.");
117117
} elseif ($core->write_config($_POST) == false) {
118-
$message = $core->show_message('error', "The database configuration file could not be written, please chmod /application/config/database.php file to 777");
118+
$message = $core->show_message('error', "The database configuration file could not be written, please chmod ".$db_config_path."/database.php file to 777");
119119
}
120120

121121
if ($core->write_configfile($_POST) == false) {
122-
$message = $core->show_message('error', "The config configuration file could not be written, please chmod /application/config/config.php file to 777");
122+
$message = $core->show_message('error', "The config configuration file could not be written, please chmod ".$db_config_path."/config.php file to 777");
123123
}
124124

125125
// If no errors, redirect to registration page
@@ -1458,7 +1458,7 @@ function prevTab() {
14581458
<body>
14591459
<div class="container mt-4 p-2" style="max-width: 600px; ">
14601460
<div class="card p-2 justify-content-center" style="min-height: 200px; margin-top: 200px;">
1461-
<p class="error text-center">Please make the /application/config/ folder writable. <strong>Example</strong>:<br /><br /><code>chmod -R 777 application/config/</code><br /><br /><i>Don't forget to restore the permissions afterwards.</i></p>
1461+
<p class="error text-center">Please make the /application/config/ folder writable. <strong>Example</strong>:<br /><br /><code>chmod -R 777 <php echo $db_config_path ?></code><br /><br /><i>Don't forget to restore the permissions afterwards.</i></p>
14621462
</div>
14631463
</div>
14641464
</body>

0 commit comments

Comments
 (0)