From bfcdef6bc91753cb2044e3626f522b5b1aec129f Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 14 Nov 2012 05:34:56 -0500
Subject: [PATCH] Merged revisions 3596-3670 from 3.0.5 stable branch.

---
 interface/lib/plugins/sites_web_vhost_subdomain_plugin.inc.php |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/interface/lib/plugins/sites_web_vhost_subdomain_plugin.inc.php b/interface/lib/plugins/sites_web_vhost_subdomain_plugin.inc.php
index ba9f061..e4de54a 100644
--- a/interface/lib/plugins/sites_web_vhost_subdomain_plugin.inc.php
+++ b/interface/lib/plugins/sites_web_vhost_subdomain_plugin.inc.php
@@ -46,19 +46,18 @@
         
 		// Get configuration for the web system
         $app->uses("getconf");        
-		$web_rec = $app->tform->getDataRecord($page_form->id);
-        $web_config = $app->getconf->get_server_config($app->functions->intval($web_rec['server_id']),'web');            
+		$web_config = $app->getconf->get_server_config($app->functions->intval($page_form->dataRecord['server_id']),'web');            
         
-        $parent_domain = $app->db->queryOneRecord("SELECT * FROM `web_domain` WHERE `domain_id` = '" . $app->functions->intval($web_rec['parent_domain_id']) . "'");
+        $parent_domain = $app->db->queryOneRecord("SELECT * FROM `web_domain` WHERE `domain_id` = '" . $app->functions->intval($page_form->dataRecord['parent_domain_id']) . "'");
         
 		// Set the values for document_root, system_user and system_group
 		$system_user = $app->db->quote($parent_domain['system_user']);
 		$system_group = $app->db->quote($parent_domain['system_group']);
 		$document_root = $app->db->quote($parent_domain['document_root']);
-		$php_open_basedir = str_replace("[website_path]/web",$document_root.'/'.$web_rec['web_folder'],$web_config["php_open_basedir"]);
-		$php_open_basedir = str_replace("[website_domain]/web",$web_rec['domain'].'/'.$web_rec['web_folder'],$php_open_basedir);
+		$php_open_basedir = str_replace("[website_path]/web",$document_root.'/'.$page_form->dataRecord['web_folder'],$web_config["php_open_basedir"]);
+		$php_open_basedir = str_replace("[website_domain]/web",$page_form->dataRecord['domain'].'/'.$page_form->dataRecord['web_folder'],$php_open_basedir);
 		$php_open_basedir = str_replace("[website_path]",$document_root,$php_open_basedir);
-		$php_open_basedir = $app->db->quote(str_replace("[website_domain]",$web_rec['domain'],$php_open_basedir));
+		$php_open_basedir = $app->db->quote(str_replace("[website_domain]",$page_form->dataRecord['domain'],$php_open_basedir));
 		$htaccess_allow_override = $app->db->quote($parent_domain['allow_override']);
 
 		$sql = "UPDATE web_domain SET sys_groupid = ".$app->functions->intval($parent_domain['sys_groupid']).",system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir'  WHERE domain_id = ".$page_form->id;

--
Gitblit v1.9.1