From 2ebadd76247dd1d985ad099edd6ca61fd0a8ea97 Mon Sep 17 00:00:00 2001
From: jwarnier <jwarnier@ispconfig3>
Date: Fri, 17 Sep 2010 20:30:15 -0400
Subject: [PATCH] improve maildirmake and remove yet other execs
---
interface/lib/classes/tform.inc.php | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index e790a8b..49fd2bd 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -40,7 +40,7 @@
* - DOUBLE
* - CURRENCY (Formats digits in currency notation)
* - VARCHAR (No format check)
-* - DATE (Date format, converts from and to linux timestamps automatically)
+* - DATE (Date format, converts from and to UNIX timestamps automatically)
*
* Formtype:
* - TEXT (Normal text field)
@@ -362,7 +362,7 @@
// If Datasource is set, get the data from there
if(isset($field['datasource']) && is_array($field['datasource'])) {
if(is_array($field["value"])) {
- $field["value"] = $field["value"] + $this->getDatasourceData($field, $record);
+ $field["value"] = array_merge($field["value"],$this->getDatasourceData($field, $record));
} else {
$field["value"] = $this->getDatasourceData($field, $record);
}
@@ -620,8 +620,9 @@
break;
case 'DATE':
if($record[$key] != '' && $record[$key] != '0000-00-00') {
- list($tag,$monat,$jahr) = explode('.',$record[$key]);
- $new_record[$key] = $jahr.'-'.$monat.'-'.$tag;
+ $date_parts = date_parse_from_format($this->dateformat,$record[$key]);
+ //list($tag,$monat,$jahr) = explode('.',$record[$key]);
+ $new_record[$key] = $date_parts['year'].'-'.$date_parts['month'].'-'.$date_parts['day'];
//$tmp = strptime($record[$key],$this->dateformat);
//$new_record[$key] = ($tmp['tm_year']+1900).'-'.($tmp['tm_mon']+1).'-'.$tmp['tm_mday'];
} else {
@@ -1421,4 +1422,4 @@
}
}
-?>
\ No newline at end of file
+?>
--
Gitblit v1.9.1