diff --git a/app/pages/config.php b/app/pages/config.php index 8998b3a..2d2d989 100644 --- a/app/pages/config.php +++ b/app/pages/config.php @@ -39,23 +39,23 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { } - - // check if file is writable - if (!is_writable($config_file)) { - $_SESSION['error'] = getError('Configuration file is not writable.'); - header("Location: $app_root?platform=$platform_id&page=config"); - exit(); - } - - // try to update the config file - if (file_put_contents($config_file, $updatedContent) !== false) { - // update successful - $_SESSION['notice'] = "Configuration for {$_POST['name']} is updated."; - } else { - // unsuccessful - $error = error_get_last(); - $_SESSION['error'] = getError('Error updating the config: ' . ($error['message'] ?? 'unknown error')); - } +// FIXME - if this is not needed for editing the flat file, remove it +// // check if file is writable +// if (!is_writable($config_file)) { +// $_SESSION['error'] = getError('Configuration file is not writable.'); +// header("Location: $app_root?platform=$platform_id&page=config"); +// exit(); +// } +// +// // try to update the config file +// if (file_put_contents($config_file, $updatedContent) !== false) { +// // update successful +// $_SESSION['notice'] = "Configuration for {$_POST['name']} is updated."; +// } else { +// // unsuccessful +// $error = error_get_last(); +// $_SESSION['error'] = getError('Error updating the config: ' . ($error['message'] ?? 'unknown error')); +// } // FIXME the new file is not loaded on first page load unset($config);