From b4e90c97c397a0436a2033f6e171cc4ea92fe276 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sat, 26 Nov 2005 09:53:32 -0500
Subject: [PATCH] exim4 config improved

---
 interface/lib/classes/tform.inc.php |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index a58200c..54bbce1 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -216,6 +216,7 @@
 			$querystring = str_replace("{GROUPS}",$_SESSION["s"]["user"]["groups"],$querystring);
 			$table_idx = $this->formDef['db_table_idx'];
 			$querystring = str_replace("{RECORDID}",$record[$table_idx],$querystring);
+			$querystring = str_replace("{AUTHSQL}",$this->getAuthSQL('r'),$querystring);
 			
 			// Getting the records
 			$tmp_records = $app->db->queryAllRecords($querystring);
@@ -435,7 +436,7 @@
 				break;
 				
 				default:
-					$new_record[$key] = htmlspecialchars($field['value']);
+					$new_record[$key] = htmlspecialchars($field['default']);
 				}
 			}
 		
@@ -600,6 +601,9 @@
 		
 		global $app;
 		
+		// If there are no data records on the tab, return empty sql string
+		if(count($this->formDef['tabs'][$tab]['fields']) == 0) return '';
+		
 		// checking permissions
 		if($this->formDef['auth'] == 'yes') {
 			if($action == "INSERT") {
@@ -653,6 +657,7 @@
 			}
         }
 		
+		
 		// F�ge Backticks nur bei unvollst�ndigen Tabellennamen ein
 		if(stristr($this->formDef['db_table'],'.')) {
 			$escape = '';

--
Gitblit v1.9.1