Commit e55c5bf3 authored by xaver's avatar xaver
Browse files

Added part of #1594, hope last part, last ereg functions replaced

parent ba035595
......@@ -295,7 +295,7 @@ class listform {
case 'DATETSTAMP':
if ($record[$key] > 0) {
// is value int?
if (ereg("^[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 @@ class listform {
case 'DATE':
if ($record[$key] > 0) {
// is value int?
if (ereg("^[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 @@ class listform {
case 'DATETIME':
if ($record[$key] > 0) {
// is value int?
if (ereg("^[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]));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment