From d06c20db2531cec31cc856bb534e81363b38f1bf Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 23 Nov 2011 04:43:08 -0500
Subject: [PATCH] Fixed: FS#1877 - Redirect Bug

---
 interface/web/sites/ajax_get_json.php              |    4 ++--
 server/plugins-available/apps_vhost_plugin.inc.php |    6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php
index a910dce..ebaa9f7 100644
--- a/interface/web/sites/ajax_get_json.php
+++ b/interface/web/sites/ajax_get_json.php
@@ -38,7 +38,7 @@
 $web_id = intval($_GET["web_id"]);
 $type = $_GET["type"];
 
-if($_SESSION["s"]["user"]["typ"] == 'admin') {
+//if($_SESSION["s"]["user"]["typ"] == 'admin') {
 
 	if($type == 'getservertype'){
 		$json = '{"servertype":"';
@@ -60,7 +60,7 @@
 		$json .= '"}';
 	}
 
-}
+//}
 
 echo $json;
 ?>
\ No newline at end of file
diff --git a/server/plugins-available/apps_vhost_plugin.inc.php b/server/plugins-available/apps_vhost_plugin.inc.php
index f9fe65b..538c46c 100644
--- a/server/plugins-available/apps_vhost_plugin.inc.php
+++ b/server/plugins-available/apps_vhost_plugin.inc.php
@@ -39,7 +39,11 @@
 	function onInstall() {
 		global $conf;
 		
-		return true;
+		if($conf['services']['web'] == true) {
+			return true;
+		} else {
+			return false;
+		}
 		
 	}
 	

--
Gitblit v1.9.1