From e35f066494564e76d4837b5420fbff1e9d7190fc Mon Sep 17 00:00:00 2001 From: mcramer <m.cramer@pixcept.de> Date: Thu, 11 Jul 2013 10:35:53 -0400 Subject: [PATCH] - Fixed: removed /e modifier in preg_replace_callback --- server/plugins-available/nginx_plugin.inc.php | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 0e0d9c3..7d45168 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -243,6 +243,7 @@ if(trim($data["new"]["ssl_cert"]) != '') $app->system->file_put_contents($crt_file,$data["new"]["ssl_cert"]); //if(trim($data["new"]["ssl_bundle"]) != '') $app->system->file_put_contents($bundle_file,$data["new"]["ssl_bundle"]); if(trim($data["new"]["ssl_key"]) != '') $app->system->file_put_contents($key_file2,$data["new"]["ssl_key"]); + $app->system->chmod($key_file2,0400); // for nginx, bundle files have to be appended to the certificate file if(trim($data["new"]["ssl_bundle"]) != ''){ @@ -2400,6 +2401,12 @@ if(is_array($lines) && !empty($lines)){ $linecount = sizeof($lines); for($h=0;$h<$linecount;$h++){ + // remove comments + if(substr(trim($lines[$h]),0,1) == '#'){ + unset($lines[$h]); + continue; + } + $lines[$h] = rtrim($lines[$h]); /* if(substr(ltrim($lines[$h]), 0, 8) == 'location' && strpos($lines[$h], '{') !== false && strpos($lines[$h], ';') !== false){ @@ -2526,8 +2533,10 @@ $app->log('Removed client directory: '.$client_dir,LOGLEVEL_DEBUG); } - $this->_exec('groupdel client'.$client_id); - $app->log('Removed group client'.$client_id,LOGLEVEL_DEBUG); + if($app->system->is_group('client'.$client_id)){ + $this->_exec('groupdel client'.$client_id); + $app->log('Removed group client'.$client_id,LOGLEVEL_DEBUG); + } } } -- Gitblit v1.9.1