From c4485fa99cee7c12be528ff44d5f255a7f09df77 Mon Sep 17 00:00:00 2001 From: mcramer <m.cramer@pixcept.de> Date: Tue, 30 Oct 2012 08:50:47 -0400 Subject: [PATCH] Fixed: IE8 did not like some of the javascript --- server/plugins-available/nginx_plugin.inc.php | 54 +++++++++++++++++++++++++++++++----------------------- 1 files changed, 31 insertions(+), 23 deletions(-) diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 399cb1e..a0e8314 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -115,7 +115,7 @@ $crt_file = $ssl_dir.'/'.$domain.'.crt'; //* Create a SSL Certificate - if($data['new']['ssl_action'] == 'create') { + if($data['new']['ssl_action'] == 'create' && $conf['mirror_server_id'] == 0) { $this->ssl_certificate_changed = true; @@ -1172,7 +1172,7 @@ unset($tmp_redirect_path); unset($tmp_redirect_path_parts); } - if(substr($alias['domain'], 0, 2) === '*.') $domain_rule = '(^|\.)'.$this->_rewrite_quote($alias['domain']); + if(substr($alias['domain'], 0, 2) === '*.') $domain_rule = '(^|\.)'.$this->_rewrite_quote(substr($alias['domain'], 2)); else $domain_rule = '^'.$this->_rewrite_quote($alias['domain']); $rewrite_rules[] = array( 'rewrite_domain' => $domain_rule, 'rewrite_type' => ($alias['redirect_type'] == 'no')?'':$alias['redirect_type'], @@ -1792,7 +1792,11 @@ } if(is_file($data['new']['document_root']."/" . $web_folder . "/stats/index.html")) $app->system->unlink($data['new']['document_root']."/" . $web_folder . "/stats/index.html"); - $app->system->copy("/usr/local/ispconfig/server/conf/awstats_index.php.master",$data['new']['document_root']."/" . $web_folder . "/stats/index.php"); + if(file_exists("/usr/local/ispconfig/server/conf-custom/awstats_index.php.master")) { + $app->system->copy("/usr/local/ispconfig/server/conf-custom/awstats_index.php.master",$data['new']['document_root']."/" . $web_folder . "/stats/index.php"); + } else { + $app->system->copy("/usr/local/ispconfig/server/conf/awstats_index.php.master",$data['new']['document_root']."/" . $web_folder . "/stats/index.php"); + } } //* Delete the awstats configuration file @@ -1904,27 +1908,31 @@ $ini_settings = explode("\n", $custom_php_ini_settings); if(is_array($ini_settings) && !empty($ini_settings)){ foreach($ini_settings as $ini_setting){ - list($key, $value) = explode('=', $ini_setting); - if($value){ - $value = trim($value); - $key = trim($key); - switch (strtolower($value)) { - case '0': - // PHP-FPM might complain about invalid boolean value if you use 0 - $value = 'off'; - case '1': - case 'on': - case 'off': - case 'true': - case 'false': - case 'yes': - case 'no': - $final_php_ini_settings[] = array('ini_setting' => 'php_admin_flag['.$key.'] = '.$value); - break; - default: - $final_php_ini_settings[] = array('ini_setting' => 'php_admin_value['.$key.'] = '.$value); - } + $ini_setting = trim($ini_setting); + if(substr($ini_setting,0,1) == ';') continue; + if(substr($ini_setting,0,1) == '#') continue; + if(substr($ini_setting,0,2) == '//') continue; + list($key, $value) = explode('=', $ini_setting); + if($value){ + $value = trim($value); + $key = trim($key); + switch (strtolower($value)) { + case '0': + // PHP-FPM might complain about invalid boolean value if you use 0 + $value = 'off'; + case '1': + case 'on': + case 'off': + case 'true': + case 'false': + case 'yes': + case 'no': + $final_php_ini_settings[] = array('ini_setting' => 'php_admin_flag['.$key.'] = '.$value); + break; + default: + $final_php_ini_settings[] = array('ini_setting' => 'php_admin_value['.$key.'] = '.$value); } + } } } } -- Gitblit v1.9.1