From 040f8cf58a0e20edb77a6fe4cfb4df1b35dc45d7 Mon Sep 17 00:00:00 2001
From: NBonline <NBonline@ispconfig3>
Date: Sun, 27 Nov 2005 18:24:00 -0500
Subject: [PATCH] Updated Swe lng files

---
 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