do not check for options if field is disabled, unset enabled-ownvhost flags for fcgid/fpm if the corresponding other one is activated; fixes #518
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -34,7 +34,7 @@ function validateFormFieldOption($fieldname, $fielddata, $newfieldvalue)
|
|||||||
$returnvalue = isset($fielddata['option_options'][$newfieldvalue]);
|
$returnvalue = isset($fielddata['option_options'][$newfieldvalue]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($returnvalue === true)
|
if($returnvalue === true || $fielddata['visible'] == false)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,12 +24,14 @@ function checkFcgidPhpFpm($fieldname, $fielddata, $newfieldvalue, $allnewfieldva
|
|||||||
'system_mod_fcgid_enabled' => array(
|
'system_mod_fcgid_enabled' => array(
|
||||||
'other_post_field' => 'system_phpfpm_enabled',
|
'other_post_field' => 'system_phpfpm_enabled',
|
||||||
'other_enabled' => 'phpfpm.enabled',
|
'other_enabled' => 'phpfpm.enabled',
|
||||||
'other_enabled_lng' => 'phpfpmstillenabled'
|
'other_enabled_lng' => 'phpfpmstillenabled',
|
||||||
|
'deactivate' => array('phpfpm.enabled_ownvhost' => 0)
|
||||||
),
|
),
|
||||||
'system_phpfpm_enabled' => array(
|
'system_phpfpm_enabled' => array(
|
||||||
'other_post_field' => 'system_mod_fcgid_enabled',
|
'other_post_field' => 'system_mod_fcgid_enabled',
|
||||||
'other_enabled' => 'system.mod_fcgid',
|
'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;
|
return $returnvalue;
|
||||||
|
|||||||
Reference in New Issue
Block a user