- put enable/disable ssl in the settings overview

- added SSLCertificateChainFile to IPs and ports and webserver-cron, fixes #418
- added domain-specific ssl-settings for lighttpd
This commit is contained in:
Michael Kaufmann (d00p)
2010-10-15 08:32:35 +00:00
parent 0b6bb64600
commit ceedab3a6e
12 changed files with 179 additions and 16 deletions

View File

@@ -1122,3 +1122,20 @@ if(isFroxlorVersion('0.9.14-svn2'))
updateToVersion('0.9.14-svn3');
}
if(isFroxlorVersion('0.9.14-svn3'))
{
showUpdateStep("Updating from 0.9.14-svn3 to 0.9.14-svn4", false);
$update_ssl_cert_chainfile = isset($_POST['update_ssl_cert_chainfile']) ? makeCorrectFile($_POST['update_ssl_cert_chainfile']) : '';
showUpdateStep("Adding SSLCertificateChainFile to the settings");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'ssl_cert_chainfile', '".$db->escape($update_ssl_cert_chainfile)."');");
lastStepStatus(0);
showUpdateStep("Adding new field to IPs and ports for SSLCertificateChainFile");
$db->query("ALTER TABLE `".TABLE_PANEL_IPSANDPORTS."` ADD `ssl_cert_chainfile` varchar(255) NOT NULL AFTER `default_vhostconf_domain`;");
lastStepStatus(0);
updateToVersion('0.9.14-svn4');
}

View File

@@ -322,4 +322,16 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
if(versionInUpdate($current_version, '0.9.14-svn4'))
{
if((int)$settings['system']['use_ssl'] == 1)
{
$has_preconfig = true;
$description = 'Froxlor now has the possibility to set \'SSLCertificateChainFile\' for the apache webserver.';
$question = '<strong>Enter filename (leave empty for none):</strong>&nbsp;';
$question.= '<input type="text" class="text" name="update_ssl_cert_chainfile" value="'.$settings['system']['ssl_cert_chainfile'].'" />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
}