From d8b194ac868efab505e87266c92cc843c3cf184e Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Thu, 20 Oct 2011 04:54:05 -0400
Subject: [PATCH] - Fixed bug in nginx plugin: folder protection got written to vhost even if no folder protection was configured.
---
server/plugins-available/nginx_plugin.inc.php | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 9fd5a8a..000b491 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -828,7 +828,8 @@
$tpl->setVar('stats_auth_passwd_file', $data['new']['document_root']."/.htpasswd_stats");
// Create basic http auth for other directories
- $tpl->setLoop('basic_auth_locations', $this->_create_web_folder_auth_configuration($data['new']));
+ $basic_auth_locations = $this->_create_web_folder_auth_configuration($data['new']);
+ if(is_array($basic_auth_locations) && !empty($basic_auth_locations)) $tpl->setLoop('basic_auth_locations', $basic_auth_locations);
$vhost_file = escapeshellcmd($web_config['nginx_vhost_conf_dir'].'/'.$data['new']['domain'].'.vhost');
//* Make a backup copy of vhost file
--
Gitblit v1.9.1