From aea43bbcd1a3671bb0b1292cea6eb145d70a5be7 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Tue, 09 Oct 2012 08:12:54 -0400
Subject: [PATCH] Bugfix: select box width in chrome

---
 server/plugins-available/nginx_reverseproxy_plugin.inc.php |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/plugins-available/nginx_reverseproxy_plugin.inc.php b/server/plugins-available/nginx_reverseproxy_plugin.inc.php
index 96f2b9b..ae4ffe9 100644
--- a/server/plugins-available/nginx_reverseproxy_plugin.inc.php
+++ b/server/plugins-available/nginx_reverseproxy_plugin.inc.php
@@ -13,7 +13,7 @@
 	function onInstall() {
 		global $conf;
 
-		if($conf['services']['proxy'] == true && $conf['nginx']['installed'] == true) {
+		if(isset($conf['services']['proxy']) && $conf['services']['proxy'] == true && isset($conf['nginx']['installed']) && $conf['nginx']['installed'] == true) {
 			return true;
 		} else {
 			return false;
@@ -63,7 +63,7 @@
 
 		if($this->action != 'insert') $this->action = 'update';
 
-		if($data['new']['type'] != 'vhost' && $data['new']['parent_domain_id'] > 0) {
+		if($data['new']['type'] != 'vhost' && $data['new']['type'] != 'vhostsubdomain' && $data['new']['parent_domain_id'] > 0) {
 
 			$old_parent_domain_id = intval($data['old']['parent_domain_id']);
 			$new_parent_domain_id = intval($data['new']['parent_domain_id']);
@@ -130,7 +130,7 @@
 		
 
 		// get alias domains (co-domains and subdomains)
-		$aliases = $app->dbmaster->queryAllRecords('SELECT * FROM web_domain WHERE parent_domain_id = '.$data['new']['domain_id']." AND active = 'y'");
+		$aliases = $app->dbmaster->queryAllRecords('SELECT * FROM web_domain WHERE parent_domain_id = '.$data['new']['domain_id']." AND type != 'vhostsubdomain' AND active = 'y'");
 		$server_alias = array();
 		switch($data['new']['subdomain']) {
 			case 'www':
@@ -280,7 +280,7 @@
 		$nginx_config = $app->getconf->get_server_config($conf['server_id'], 'web');
 
 
-		if($data['old']['type'] == 'vhost') {
+		if($data['old']['type'] == 'vhost' || $data['old']['type'] == 'vhostsubdomain') {
 
 			//* This is a website
 			// Deleting the vhost file, symlink and the data directory

--
Gitblit v1.9.1