mirror of
https://github.com/slawkens/myaac.git
synced 2025-11-27 21:56:50 +01:00
Fix when config.local.php cannot be saved
This commit is contained in:
@@ -42,10 +42,9 @@ if(!$error) {
|
|||||||
$configToSave['cache_prefix'] = 'myaac_' . generateRandomString(8, true, false, true);
|
$configToSave['cache_prefix'] = 'myaac_' . generateRandomString(8, true, false, true);
|
||||||
$configToSave['database_auto_migrate'] = true;
|
$configToSave['database_auto_migrate'] = true;
|
||||||
|
|
||||||
if(!$error) {
|
|
||||||
$content = '';
|
$content = '';
|
||||||
$saved = Settings::saveConfig($configToSave, BASE . 'config.local.php', $content);
|
$saved = Settings::saveConfig($configToSave, BASE . 'config.local.php', $content);
|
||||||
if ($saved) {
|
if ($saved || file_exists(BASE . 'config.local.php')) {
|
||||||
success($locale['step_database_config_saved']);
|
success($locale['step_database_config_saved']);
|
||||||
$_SESSION['saved'] = true;
|
$_SESSION['saved'] = true;
|
||||||
|
|
||||||
@@ -74,15 +73,15 @@ if(!$error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$error = true;
|
||||||
$_SESSION['config_content'] = $content;
|
$_SESSION['config_content'] = $content;
|
||||||
unset($_SESSION['saved']);
|
unset($_SESSION['saved']);
|
||||||
|
|
||||||
$locale['step_database_error_file'] = str_replace('$FILE$', '<b>' . BASE . 'config.php</b>', $locale['step_database_error_file']);
|
$locale['step_database_error_file'] = str_replace('$FILE$', '<b>' . BASE . 'config.local.php</b>', $locale['step_database_error_file']);
|
||||||
error($locale['step_database_error_file'] . '<br/>
|
error($locale['step_database_error_file'] . '<br/>
|
||||||
<textarea cols="70" rows="10">' . $content . '</textarea>');
|
<textarea cols="70" rows="10">' . $content . '</textarea>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="text-center m-3">
|
<div class="text-center m-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user