tbrehm
2008-08-31 e76fb5058a25b5ee1f35f45e2fd3a5031d4b28e2
install/lib/installer_base.lib.php
@@ -157,12 +157,17 @@
         $from_host = $conf['hostname'];
      }
      
      // Delete ISPConfig user, in case that it exists
      $this->db->query("DELETE FROM mysql.user WHERE User = '".$cf['ispconfig_user']."' AND Host = '".$from_host."';");
      $this->db->query("DELETE FROM mysql.db WHERE Db = '".$cf['database']."' AND Host = '".$from_host."';");
      $this->db->query('FLUSH PRIVILEGES;');
      //* Create the ISPConfig database user
        $query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$cf['database'].".* "
                ."TO '".$cf['ispconfig_user']."'@'".$from_host."' "
                ."IDENTIFIED BY '".$cf['ispconfig_password']."';";
      if(!$this->db->query($query)) {
         $this->error('Unable to create database user: '.$cf['ispconfig_user']);
         $this->error('Unable to create database user: '.$cf['ispconfig_user'].' Error: '.$this->db->errorMessage);
      }
      
      //* Reload database privelages
@@ -510,7 +515,7 @@
      if(is_file($conf["postfix"]["config_dir"].'/master.cf')) copy($conf["postfix"]["config_dir"].'/master.cf',$conf["postfix"]["config_dir"].'/master.cf~');
      $content = rf("tpl/master_cf_amavis.master");
      // Only add the content if we had not addded it before
      if(!stristr("127.0.0.1:10025",$content)) {
      if(!stristr($content,"127.0.0.1:10025")) {
         af($conf["postfix"]["config_dir"].'/master.cf',$content);
      }