From a4262c618cfe8b15b4b0b4c3847e77c9f65552c9 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 23 Apr 2008 16:43:17 -0400
Subject: [PATCH] Updated Debian installation instructions.

---
 interface/lib/classes/listform.inc.php |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php
index 27d1c8a..d555400 100644
--- a/interface/lib/classes/listform.inc.php
+++ b/interface/lib/classes/listform.inc.php
@@ -1,7 +1,7 @@
 <?php
 
 /*
-Copyright (c) 2005, Till Brehm, projektfarm Gmbh
+Copyright (c) 2007, Till Brehm, projektfarm Gmbh
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification,
@@ -48,10 +48,12 @@
     private $module;
 	private $dateformat = 'd.m.Y';
 
-    public function loadListDef($file,$module = '')
+    public function loadListDef($file, $module = '')
     {
         global $app,$conf;
-        if(!is_file($file)) die("List-Definition: $file not found.");
+        if(!is_file($file)){
+            die("List-Definition: $file not found.");
+        }
         require_once($file);
         $this->listDef = $liste;
         $this->module = $module;
@@ -131,7 +133,7 @@
             $field = $i['field'];
 
             //*TODO: comment =  hat sich die suche ge�ndert
-            if(isset($_REQUEST[$search_prefix.$field]) and $_REQUEST[$search_prefix.$field] != $_SESSION['search'][$list_name][$search_prefix.$field]){
+            if(isset($_REQUEST[$search_prefix.$field]) && isset($_SESSION['search'][$list_name][$search_prefix.$field]) && $_REQUEST[$search_prefix.$field] != $_SESSION['search'][$list_name][$search_prefix.$field]){
                     $this->searchChanged = 1;
             }
 
@@ -268,8 +270,8 @@
         if(is_array($record)) {
             foreach($this->listDef['item'] as $field){
                 $key = $field['field'];
-                switch ($field['datatype']){
-
+				if(isset($record[$key])) {
+                	switch ($field['datatype']){
                     case 'VARCHAR':
                     case 'TEXT':
                         $record[$key] = stripslashes($record[$key]);
@@ -293,7 +295,8 @@
 
                     default:
                         $record[$key] = stripslashes($record[$key]);
-                }	
+                	}
+				}
             }
         }
         return $record;

--
Gitblit v1.9.1