migrated a few functions to new Settings class and removed unused function createAWStatsVhost(), refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -15,44 +15,30 @@
|
||||
*
|
||||
*/
|
||||
|
||||
function checkPathConflicts($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues)
|
||||
{
|
||||
global $settings, $theme;
|
||||
if((int)$settings['system']['mod_fcgid'] == 1)
|
||||
{
|
||||
/**
|
||||
* fcgid-configdir has changed ->
|
||||
* check against customer-doc-prefix
|
||||
*/
|
||||
if($fieldname == "system_mod_fcgid_configdir")
|
||||
{
|
||||
function checkPathConflicts($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues) {
|
||||
|
||||
if((int)Settings::Get('system.mod_fcgid') == 1) {
|
||||
// fcgid-configdir has changed -> check against customer-doc-prefix
|
||||
if ($fieldname == "system_mod_fcgid_configdir") {
|
||||
$newdir = makeCorrectDir($newfieldvalue);
|
||||
$cdir = makeCorrectDir($settings['system']['documentroot_prefix']);
|
||||
$cdir = makeCorrectDir(Settings::Get('system.documentroot_prefix'));
|
||||
}
|
||||
/**
|
||||
* customer-doc-prefix has changed ->
|
||||
* check against fcgid-configdir
|
||||
*/
|
||||
elseif($fieldname == "system_documentroot_prefix")
|
||||
{
|
||||
// customer-doc-prefix has changed -> check against fcgid-configdir
|
||||
elseif ($fieldname == "system_documentroot_prefix") {
|
||||
$newdir = makeCorrectDir($newfieldvalue);
|
||||
$cdir = makeCorrectDir($settings['system']['mod_fcgid_configdir']);
|
||||
$cdir = makeCorrectDir(Settings::Get('system.mod_fcgid_configdir'));
|
||||
}
|
||||
|
||||
// neither dir can be within the other nor can they be equal
|
||||
if(substr($newdir, 0, strlen($cdir)) == $cdir
|
||||
|| substr($cdir, 0, strlen($newdir)) == $newdir
|
||||
|| $newdir == $cdir
|
||||
if (substr($newdir, 0, strlen($cdir)) == $cdir
|
||||
|| substr($cdir, 0, strlen($newdir)) == $newdir
|
||||
|| $newdir == $cdir
|
||||
) {
|
||||
$returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'fcgidpathcannotbeincustomerdoc');
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_OK);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_OK);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user