From 620df024f3d8960a89eb4ed71d3ea61e2b9aa3db Mon Sep 17 00:00:00 2001
From: quentusrex <quentusrex@ispconfig3>
Date: Thu, 30 Oct 2008 13:59:40 -0400
Subject: [PATCH] Now a client can view e-mail filters created by admin, but the client can't edit them. The client can submit a change, but it isn't input in the database, nor is the client told that the changes aren't made.

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

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 1d8c445..cb169e9 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -191,6 +191,7 @@
 			$tmp = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$parent_domain_id." AND active = 'y'");
 			$data["new"] = $tmp;
 			$data["old"] = $tmp;
+			$this->action = 'update';
 		}
 		
 		
@@ -284,7 +285,7 @@
 		}
 		
 		
-		if($this->action == 'insert') {
+		if($this->action == 'insert' && $data["new"]["type"] == 'vhost') {
 			// Copy the error pages
 			$error_page_path = escapeshellcmd($data["new"]["document_root"])."/web/error/";
 			exec("cp /usr/local/ispconfig/server/conf/error/".substr(escapeshellcmd($conf["language"]),0,2)."/* ".$error_page_path);
@@ -336,6 +337,7 @@
 		
 		$vhost_data = $data["new"];
 		$vhost_data["web_document_root"] = $data["new"]["document_root"]."/web";
+		$vhost_data["web_document_root_www"] = "/var/www/".$data["new"]["domain"]."/web";
 		
 		// Check if a SSL cert exists
 		$ssl_dir = $data["new"]["document_root"]."/ssl";
@@ -432,6 +434,7 @@
 
 			$tpl->setVar('fastcgi_alias',$fastcgi_config["fastcgi_alias"]);
 			$tpl->setVar('fastcgi_starter_path',$fastcgi_starter_path);
+			$tpl->setVar('fastcgi_starter_script',$fastcgi_config["fastcgi_starter_script"]);
 			
 		}
 		

--
Gitblit v1.9.1