diff --git a/lib/functions/formfields/option/function.validateFormFieldOption.php b/lib/functions/formfields/option/function.validateFormFieldOption.php index cbda0408..01b4be5f 100644 --- a/lib/functions/formfields/option/function.validateFormFieldOption.php +++ b/lib/functions/formfields/option/function.validateFormFieldOption.php @@ -34,7 +34,7 @@ function validateFormFieldOption($fieldname, $fielddata, $newfieldvalue) $returnvalue = isset($fielddata['option_options'][$newfieldvalue]); } - if($returnvalue === true) + if($returnvalue === true || $fielddata['visible'] == false) { return true; } diff --git a/lib/functions/validate/function.checkFcgidPhpFpm.php b/lib/functions/validate/function.checkFcgidPhpFpm.php index c0431f0d..add4e3df 100644 --- a/lib/functions/validate/function.checkFcgidPhpFpm.php +++ b/lib/functions/validate/function.checkFcgidPhpFpm.php @@ -24,12 +24,14 @@ function checkFcgidPhpFpm($fieldname, $fielddata, $newfieldvalue, $allnewfieldva 'system_mod_fcgid_enabled' => array( 'other_post_field' => 'system_phpfpm_enabled', 'other_enabled' => 'phpfpm.enabled', - 'other_enabled_lng' => 'phpfpmstillenabled' + 'other_enabled_lng' => 'phpfpmstillenabled', + 'deactivate' => array('phpfpm.enabled_ownvhost' => 0) ), 'system_phpfpm_enabled' => array( 'other_post_field' => 'system_mod_fcgid_enabled', 'other_enabled' => 'system.mod_fcgid', - 'other_enabled_lng' => 'fcgidstillenabled' + 'other_enabled_lng' => 'fcgidstillenabled', + 'deactivate' => array('system.mod_fcgid_ownvhost' => 0) ) ); @@ -56,6 +58,13 @@ function checkFcgidPhpFpm($fieldname, $fielddata, $newfieldvalue, $allnewfieldva } } } + if (in_array(FORMFIELDS_PLAUSIBILITY_CHECK_OK, $returnvalue)) { + // be sure to deactivate the other one for the froxlor-vhost + // to avoid having a settings-deadlock + foreach ($check_array[$fieldname]['deactivate'] as $setting => $value) { + Settings::Set($setting, $value, true); + } + } } return $returnvalue;