From d053cb07eeb77c0252e23a28de0c834f8442897d Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Sat, 14 Feb 2009 10:54:34 -0500 Subject: [PATCH] Fixed moving of site when the client is changed. --- interface/web/sites/web_domain_edit.php | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php index 154e5f4..dae435d 100644 --- a/interface/web/sites/web_domain_edit.php +++ b/interface/web/sites/web_domain_edit.php @@ -330,15 +330,15 @@ $client_id = intval($client["client_id"]); } - /* - // Set the values for document_root, system_user and system_group - $system_user = 'web'.$this->id; - $system_group = 'client'.$client_id; - $document_root = str_replace("[client_id]",$client_id,$document_root); + if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"]) && $this->dataRecord["client_group_id"] != $this->oldDataRecord["client_group_id"]) { + // Set the values for document_root, system_user and system_group + $system_user = 'web'.$this->id; + $system_group = 'client'.$client_id; + $document_root = str_replace("[client_id]",$client_id,$document_root); - $sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root' WHERE domain_id = ".$this->id; - $app->db->query($sql); - */ + $sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root' WHERE domain_id = ".$this->id; + $app->db->query($sql); + } } -- Gitblit v1.9.1