- add setting for default php-configuration, fixes #182
- set version to 0.9.6-svn5
This commit is contained in:
@@ -595,4 +595,22 @@ if(isFroxlorVersion('0.9.6-svn3'))
|
||||
updateToVersion('0.9.6-svn4');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.6-svn4'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6-svn4 to 0.9.6-svn5", false);
|
||||
|
||||
$update_defsys_phpconfig = isset($_POST['update_defsys_phpconfig']) ? intval($_POST['update_defsys_phpconfig']) : 1;
|
||||
|
||||
if($update_defsys_phpconfig != 1) {
|
||||
showUpdateStep("Setting default php-configuration to user defined config #".$update_defsys_phpconfig);
|
||||
} else {
|
||||
showUpdateStep("Adding default php-configuration setting to the database");
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_defaultini', '".(int)$update_defsys_phpconfig."');");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.6-svn5');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -79,4 +79,20 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
$question .= $priorities.'</select>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.6-svn5'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'If you have more than one PHP-configurations defined in Froxlor you can know set a default one which will be used for every domain.';
|
||||
$question = '<strong>Select default PHP-configuration:</strong> ';
|
||||
$question .= '<select name="update_defsys_phpconfig">';
|
||||
$configs_array = getPhpConfigs();
|
||||
$configs = '';
|
||||
foreach($configs_array as $idx => $desc)
|
||||
{
|
||||
$configs .= makeoption($desc, $idx, '1');
|
||||
}
|
||||
$question .= $configs.'</select>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user