From 9cf2c25a64a23a1be36f9cd0af8aac150b659f14 Mon Sep 17 00:00:00 2001 From: latham <latham@ispconfig3> Date: Fri, 28 Oct 2011 11:33:06 -0400 Subject: [PATCH] start adding SPF by adding enum in table --- interface/web/sites/database_edit.php | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php index f59db12..e066943 100644 --- a/interface/web/sites/database_edit.php +++ b/interface/web/sites/database_edit.php @@ -97,10 +97,10 @@ $clients = $app->db->queryAllRecords($sql); $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$client['client_id']); $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contact_name'].'</option>'; - $tmp_data_record = $app->tform->getDataRecord($this->id); + //$tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; + $selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':''; $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n"; } } @@ -135,10 +135,10 @@ $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name"; $clients = $app->db->queryAllRecords($sql); $client_select = "<option value='0'></option>"; - $tmp_data_record = $app->tform->getDataRecord($this->id); + //$tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; + $selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':''; $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n"; } } -- Gitblit v1.9.1