From 5ec4395f0e23bf11b3edef5c745e8f38c73ce637 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Fri, 24 Oct 2014 09:33:54 -0400
Subject: [PATCH] Merge branch 'stable-3.0.5'
---
install/lib/installer_base.lib.php | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 8180e0d..b033006 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1015,19 +1015,20 @@
//* Get the dovecot version
exec('dovecot --version', $tmp);
- $parts = explode('.', trim($tmp[0]));
- $dovecot_version = $parts[0];
+ $dovecot_version = $tmp[0];
unset($tmp);
- unset($parts);
//* Copy dovecot configuration file
- if($dovecot_version == 2) {
+ if(version_compare($dovecot_version,2) >= 0) {
if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot2.conf.master')) {
copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot2.conf.master', $config_dir.'/'.$configfile);
} else {
copy('tpl/debian_dovecot2.conf.master', $config_dir.'/'.$configfile);
}
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
+ if(version_compare($dovecot_version,2.1) < 0) {
+ removeLine($config_dir.'/'.$configfile, 'ssl_protocols =');
+ }
} else {
if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master')) {
copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master', $config_dir.'/'.$configfile);
@@ -2272,7 +2273,7 @@
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mysql_clientdb.conf.master', 'tpl/mysql_clientdb.conf.master');
$content = str_replace('{hostname}', $conf['mysql']['host'], $content);
$content = str_replace('{username}', $conf['mysql']['admin_user'], $content);
- $content = str_replace('{password}', $conf['mysql']['admin_password'], $content);
+ $content = str_replace('{password}', addslashes($conf['mysql']['admin_password']), $content);
wf($install_dir.'/server/lib/mysql_clientdb.conf', $content);
chmod($install_dir.'/server/lib/mysql_clientdb.conf', 0600);
chown($install_dir.'/server/lib/mysql_clientdb.conf', 'root');
--
Gitblit v1.9.1