Skip to content
Snippets Groups Projects
Commit e55c5bf3 authored by xaver's avatar xaver
Browse files

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

parent ba035595
No related branches found
No related tags found
No related merge requests found
...@@ -295,7 +295,7 @@ class listform { ...@@ -295,7 +295,7 @@ class listform {
case 'DATETSTAMP': case 'DATETSTAMP':
if ($record[$key] > 0) { if ($record[$key] > 0) {
// is value int? // 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]); $record[$key] = date($this->lng('conf_format_dateshort'), $record[$key]);
} else { } else {
$record[$key] = date($this->lng('conf_format_dateshort'), strtotime($record[$key])); $record[$key] = date($this->lng('conf_format_dateshort'), strtotime($record[$key]));
...@@ -305,7 +305,7 @@ class listform { ...@@ -305,7 +305,7 @@ class listform {
case 'DATE': case 'DATE':
if ($record[$key] > 0) { if ($record[$key] > 0) {
// is value int? // 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]); $record[$key] = date($this->lng('conf_format_dateshort'), $record[$key]);
} else { } else {
$record[$key] = date($this->lng('conf_format_dateshort'), strtotime($record[$key])); $record[$key] = date($this->lng('conf_format_dateshort'), strtotime($record[$key]));
...@@ -316,7 +316,7 @@ class listform { ...@@ -316,7 +316,7 @@ class listform {
case 'DATETIME': case 'DATETIME':
if ($record[$key] > 0) { if ($record[$key] > 0) {
// is value int? // 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]); $record[$key] = date($this->lng('conf_format_datetime'), $record[$key]);
} else { } else {
$record[$key] = date($this->lng('conf_format_datetime'), strtotime($record[$key])); $record[$key] = date($this->lng('conf_format_datetime'), strtotime($record[$key]));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment