From 327f28a3e300b3e5c7000cbb0763cc8314b1c45b Mon Sep 17 00:00:00 2001 From: tbrehm Date: Tue, 26 Jan 2010 15:50:49 +0000 Subject: [PATCH] Fixed: FS#1045 - Error when a reseller edit site --- interface/web/dns/dns_soa_edit.php | 6 ++++-- interface/web/mail/mail_domain_edit.php | 6 ++++-- interface/web/sites/database_edit.php | 6 ++++-- interface/web/sites/web_domain_edit.php | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/interface/web/dns/dns_soa_edit.php b/interface/web/dns/dns_soa_edit.php index d2eb15854..a94cf0130 100644 --- a/interface/web/dns/dns_soa_edit.php +++ b/interface/web/dns/dns_soa_edit.php @@ -76,9 +76,10 @@ class page_action extends tform_actions { $clients = $app->db->queryAllRecords($sql); $client_select = ''; if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= ""; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = ($client["groupid"] == @$this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = ($client["groupid"] == @$tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "\r\n"; } } @@ -93,9 +94,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY name"; $clients = $app->db->queryAllRecords($sql); $client_select = ''; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "\r\n"; } } diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index 0106ebc0a..ed8420d11 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -80,9 +80,10 @@ class page_action extends tform_actions { $clients = $app->db->queryAllRecords($sql); $client_select = ''; if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= ""; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = ($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = ($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "\r\n"; } } @@ -103,9 +104,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']; $clients = $app->db->queryAllRecords($sql); $client_select = ''; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "\r\n"; } } diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php index 9ffc42bf9..8dba245c7 100644 --- a/interface/web/sites/database_edit.php +++ b/interface/web/sites/database_edit.php @@ -96,9 +96,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY name"; $clients = $app->db->queryAllRecords($sql); $client_select = ''; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "\r\n"; } } @@ -133,9 +134,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name"; $clients = $app->db->queryAllRecords($sql); $client_select = ""; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "\r\n"; } } diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php index e87438714..557bcdb93 100644 --- a/interface/web/sites/web_domain_edit.php +++ b/interface/web/sites/web_domain_edit.php @@ -114,9 +114,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY name"; $records = $app->db->queryAllRecords($sql); $client_select = ''; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($records)) { foreach( $records as $rec) { - $selected = @($rec["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($rec["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "\r\n"; } } @@ -169,9 +170,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name"; $clients = $app->db->queryAllRecords($sql); $client_select = ""; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "\r\n"; } } -- GitLab