From f7fceed4bd17a1672068f2e57d517365cdeb76c7 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 10 May 2012 12:15:21 -0400
Subject: [PATCH] Fixed: FS#2068 - use CSS for DNS active icons

---
 interface/lib/classes/listform.inc.php |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php
index a5843d6..ee91b88 100644
--- a/interface/lib/classes/listform.inc.php
+++ b/interface/lib/classes/listform.inc.php
@@ -282,7 +282,7 @@
     public function decode($record) 
     {
         global $conf, $app;
-        if(is_array($record) && count($record) > 0) {
+        if(is_array($record) && count($record) > 0 && is_array($this->listDef['item'])) {
             foreach($this->listDef['item'] as $field){
                 $key = $field['field'];
 				if(isset($record[$key])) {
@@ -295,7 +295,7 @@
                     case 'DATETSTAMP':
                         if ($record[$key] > 0) {
 							// is value int?
-							if (preg_match("/^[0-9]+[.]?[0-9]*$/", $record[$key], $p)) {
+							if (preg_match("/^[0-9]+[\.]?[0-9]*$/", $record[$key], $p)) {
 	                        	$record[$key] = date($this->lng('conf_format_dateshort'), $record[$key]);
 							} else {
 	                        	$record[$key] = date($this->lng('conf_format_dateshort'), strtotime($record[$key]));
@@ -305,7 +305,7 @@
 					case 'DATE':
                         if ($record[$key] > 0) {
 							// is value int?
-							if (preg_match("/^[0-9]+[.]?[0-9]*$/", $record[$key], $p)) {
+							if (preg_match("/^[0-9]+[\.]?[0-9]*$/", $record[$key], $p)) {
 	                        	$record[$key] = date($this->lng('conf_format_dateshort'), $record[$key]);
 							} else {
 	                        	$record[$key] = date($this->lng('conf_format_dateshort'), strtotime($record[$key]));
@@ -316,7 +316,7 @@
                     case 'DATETIME':
                         if ($record[$key] > 0) {
 							// is value int?
-							if (preg_match("/^[0-9]+[.]?[0-9]*$/", $record[$key], $p)) {
+							if (preg_match("/^[0-9]+[\.]?[0-9]*$/", $record[$key], $p)) {
 	                        	$record[$key] = date($this->lng('conf_format_datetime'), $record[$key]);
 							} else {
 	                        	$record[$key] = date($this->lng('conf_format_datetime'), strtotime($record[$key]));

--
Gitblit v1.9.1