ftimme
2011-10-11 81d79a79e4b29e9314b64b2e4c49b48ae8319767
install/lib/update.lib.php
@@ -126,7 +126,7 @@
   
   $conf['postfix']['vmail_mailbox_base'] = $ini_array['mail']['homedir_path'];
   
   if($ini_array['web']['server_type'] != ''){
   if(isset($ini_array['web']['server_type']) && $ini_array['web']['server_type'] != ''){
      $conf['webserver']['server_type'] = $ini_array['web']['server_type'];
      if($conf['webserver']['server_type'] == 'nginx'){
         $conf['apache']['installed'] = false;
@@ -260,17 +260,18 @@
   $tpl_ini_array['dns']['named_conf_path'] = $conf['bind']['named_conf_path'];
   $tpl_ini_array['dns']['named_conf_local_path'] = $conf['bind']['named_conf_local_path'];
   
   $tpl_ini_array['web']['nginx_vhost_conf_dir'] = $conf['nginx']['vhost_conf_dir'];
   $tpl_ini_array['web']['nginx_vhost_conf_enabled_dir'] = $conf['nginx']['vhost_conf_enabled_dir'];
   $tpl_ini_array['web']['nginx_user'] = $conf['nginx']['user'];
   $tpl_ini_array['web']['nginx_group'] = $conf['nginx']['group'];
   $tpl_ini_array['web']['nginx_cgi_socket'] = $conf['nginx']['cgi_socket'];
   $tpl_ini_array['web']['php_fpm_init_script'] = $conf['nginx']['php_fpm_init_script'];
   $tpl_ini_array['web']['php_fpm_ini_path'] = $conf['nginx']['php_fpm_ini_path'];
   $tpl_ini_array['web']['php_fpm_pool_dir'] = $conf['nginx']['php_fpm_pool_dir'];
   $tpl_ini_array['web']['php_fpm_start_port'] = $conf['nginx']['php_fpm_start_port'];
   $tpl_ini_array['web']['php_fpm_socket_dir'] = $conf['nginx']['php_fpm_socket_dir'];
   if ($conf['nginx']['installed'] == true) {
      $tpl_ini_array['web']['nginx_vhost_conf_dir'] = $conf['nginx']['vhost_conf_dir'];
      $tpl_ini_array['web']['nginx_vhost_conf_enabled_dir'] = $conf['nginx']['vhost_conf_enabled_dir'];
      $tpl_ini_array['web']['nginx_user'] = $conf['nginx']['user'];
      $tpl_ini_array['web']['nginx_group'] = $conf['nginx']['group'];
      $tpl_ini_array['web']['nginx_cgi_socket'] = $conf['nginx']['cgi_socket'];
      $tpl_ini_array['web']['php_fpm_init_script'] = $conf['nginx']['php_fpm_init_script'];
      $tpl_ini_array['web']['php_fpm_ini_path'] = $conf['nginx']['php_fpm_ini_path'];
      $tpl_ini_array['web']['php_fpm_pool_dir'] = $conf['nginx']['php_fpm_pool_dir'];
      $tpl_ini_array['web']['php_fpm_start_port'] = $conf['nginx']['php_fpm_start_port'];
      $tpl_ini_array['web']['php_fpm_socket_dir'] = $conf['nginx']['php_fpm_socket_dir'];
      $tpl_ini_array['web']['server_type'] = 'nginx';
      $tpl_ini_array['global']['webserver'] = 'nginx';
   }
@@ -285,7 +286,8 @@
   }
   $new_ini = array_to_ini($tpl_ini_array);
   $inst->db->query("UPDATE server SET config = '".mysql_real_escape_string($new_ini)."' WHERE server_id = ".$conf['server_id']);
   $sql = "UPDATE server SET config = '".mysql_real_escape_string($new_ini)."' WHERE server_id = ".$conf['server_id'];
   $inst->db->query($sql);
   unset($old_ini_array);
   unset($tpl_ini_array);
   unset($new_ini);