do not check for allowed-phpconfigs if fpm/fcgid is not activated (no possibility to select a config anyway)

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2021-12-14 11:23:36 +01:00
parent f4d9e64804
commit 5ccae3f9bb

View File

@@ -268,9 +268,12 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
} else { } else {
$allowed_phpconfigs = []; $allowed_phpconfigs = [];
} }
// only with fcgid/fpm enabled will it be possible to select a php-setting
if ((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) {
if (! in_array($phpsid_result['phpsettingid'], $allowed_phpconfigs)) { if (! in_array($phpsid_result['phpsettingid'], $allowed_phpconfigs)) {
\Froxlor\UI\Response::standard_error('notallowedphpconfigused', '', true); \Froxlor\UI\Response::standard_error('notallowedphpconfigused', '', true);
} }
}
// actually insert domain // actually insert domain
$stmt = Database::prepare(" $stmt = Database::prepare("
@@ -654,9 +657,12 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
} else { } else {
$allowed_phpconfigs = []; $allowed_phpconfigs = [];
} }
// only with fcgid/fpm enabled will it be possible to select a php-setting
if ((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) {
if (! in_array($phpsettingid, $allowed_phpconfigs)) { if (! in_array($phpsettingid, $allowed_phpconfigs)) {
\Froxlor\UI\Response::standard_error('notallowedphpconfigused', '', true); \Froxlor\UI\Response::standard_error('notallowedphpconfigused', '', true);
} }
}
// handle redirect // handle redirect
if ($_doredirect) { if ($_doredirect) {