From 821afd6fea7403dd2cd0d83522469bca9d301bad Mon Sep 17 00:00:00 2001
From: moglia <moglia@ispconfig3>
Date: Mon, 15 Feb 2010 21:19:33 -0500
Subject: [PATCH] Some Brazilian Portuguese Language Updates
---
interface/web/sites/database_edit.php | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php
index 9ffc42b..58fd924 100644
--- a/interface/web/sites/database_edit.php
+++ b/interface/web/sites/database_edit.php
@@ -95,10 +95,12 @@
// Fill the client select field
$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 = '<option value="'.$client['client_id'].'">'.$client['contact_name'].'</option>';
+ $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);
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 .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n";
}
}
@@ -133,9 +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);
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 .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n";
}
}
--
Gitblit v1.9.1