show replacer-variables in php-config add/edit and fpm-versions add/edit; catch potential Exception thrown by Form::processForm() to display the error nicely; minor fixes in field-visibility for phpconfigs depending on php-interface and webserver; validate fcgid/fpm enable-flag correctly if not POST'ed at the same time (older behaviour)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -79,23 +79,27 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
|
||||
Response::standardError(lng('error.session_timeout'), lng('error.session_timeout_desc'));
|
||||
}
|
||||
|
||||
if (Form::processForm($settings_data, $_POST, [
|
||||
'filename' => $filename,
|
||||
'action' => $action,
|
||||
'page' => $page
|
||||
], $_part, $settings_all, $settings_part, $only_enabledisable)) {
|
||||
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
|
||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
Cronjob::inserttask(TaskId::REBUILD_DNS);
|
||||
// cron.d file
|
||||
Cronjob::inserttask(TaskId::REBUILD_CRON);
|
||||
|
||||
Response::standardSuccess('settingssaved', '', [
|
||||
try {
|
||||
if (Form::processForm($settings_data, $_POST, [
|
||||
'filename' => $filename,
|
||||
'action' => $action,
|
||||
'page' => $page
|
||||
]);
|
||||
], $_part, $settings_all, $settings_part, $only_enabledisable)) {
|
||||
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
|
||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
Cronjob::inserttask(TaskId::REBUILD_DNS);
|
||||
// cron.d file
|
||||
Cronjob::inserttask(TaskId::REBUILD_CRON);
|
||||
|
||||
Response::standardSuccess('settingssaved', '', [
|
||||
'filename' => $filename,
|
||||
'action' => $action,
|
||||
'page' => $page
|
||||
]);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
Response::dynamicError($e->getMessage(), $e->getCode());
|
||||
}
|
||||
} else {
|
||||
$_part = isset($_GET['part']) ? $_GET['part'] : '';
|
||||
|
||||
Reference in New Issue
Block a user