From fb3a98c0f06fb14a188e5a020936768fa04cb205 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Fri, 22 Oct 2010 06:24:31 -0400 Subject: [PATCH] Merged serveral bugfixes and new language files from stable branch (revisions 2055 - 2093) --- install/lib/installer_base.lib.php | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 4626c22..f9c4ba3 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -292,6 +292,8 @@ * 1) it is a single server * 2) it is the MASTER of n clients */ + $hosts = array(); + if($conf['mysql']['master_slave_setup'] == 'y') { /* * it is a master-slave - Setup so the slave has to grant its rights in the master @@ -326,7 +328,7 @@ } } - if(is_array($hosts)) { + if(count($hosts) > 0) { foreach($hosts as $host => $value) { /* * If a pwd exists, this means, we have to add the new user (and his pwd). @@ -711,11 +713,11 @@ $config_dir = $conf['dovecot']['config_dir']; //* Configure master.cf and add a line for deliver - if(is_file($config_dir.'/master.cf')) { - copy($config_dir.'/master.cf', $config_dir.'/master.cf~2'); + if(is_file($conf['postfix']['config_dir'].'/master.cf')) { + copy($conf['postfix']['config_dir'].'/master.cf', $conf['postfix']['config_dir'].'/master.cf~2'); } - if(is_file($config_dir.'/master.cf~')) { - chmod($config_dir.'/master.cf~2', 0400); + if(is_file($conf['postfix']['config_dir'].'/master.cf~')) { + chmod($conf['postfix']['config_dir'].'/master.cf~2', 0400); } $content = rf($conf['postfix']['config_dir'].'/master.cf'); // Only add the content if we had not addded it before @@ -1058,7 +1060,7 @@ $tcp_public_services = ''; $udp_public_services = ''; - $row = $this->db->queryOneRecord('SELECT * FROM firewall WHERE server_id = '.intval($conf['server_id'])); + $row = $this->db->queryOneRecord('SELECT * FROM '.$conf["mysql"]["database"].'.firewall WHERE server_id = '.intval($conf['server_id'])); if(trim($row['tcp_port']) != '' || trim($row['udp_port']) != '') { $tcp_public_services = trim(str_replace(',',' ',$row['tcp_port'])); -- Gitblit v1.9.1