This commit has been accessed 574 times via Git panel.
commit 689a2ccd022b932a01008474791d702179c1bac1
tree cae70740d232bc78a4f2b6767933ef18434348f4
parent f4d88952290d31f862b468c33b0ad32838959eb6
author Engels Antonio <engels@majcms.org> 1347423603 +0800
committer Engels Antonio <engels@majcms.org> 1347423603 +0800
Fix time_elapsed_string() input
diff --git a/inbox.php b/inbox.php
index c6c2658..0eb0535 100644
--- a/inbox.php
+++ b/inbox.php
@@ -132,6 +132,8 @@ foreach ($mbox_sort as $mbox_num => $mbox_row) {
}
$date = $val[0]->date;
+ $date = preg_replace("/\([^\)]+\)/","",$date);
+ $date = trim($date);
$date = strtotime($date);
$date = time_elapsed_string($date);
diff --git a/read.php b/read.php
index b5bb4d0..a316948 100644
--- a/read.php
+++ b/read.php
@@ -21,7 +21,8 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$header_toaddress = htmlentities($header_toaddress,ENT_QUOTES);
$header_date = header_mime2text($header->date);
-
+ $header_date = preg_replace("/\([^\)]+\)/","",$header_date);
+ $header_date = trim($header_date);
$header_date_age = time_elapsed_string(strtotime($header_date));
$header_ccaddress = header_mime2text($header->ccaddress);
tree cae70740d232bc78a4f2b6767933ef18434348f4
parent f4d88952290d31f862b468c33b0ad32838959eb6
author Engels Antonio <engels@majcms.org> 1347423603 +0800
committer Engels Antonio <engels@majcms.org> 1347423603 +0800
Fix time_elapsed_string() input
diff --git a/inbox.php b/inbox.php
index c6c2658..0eb0535 100644
--- a/inbox.php
+++ b/inbox.php
@@ -132,6 +132,8 @@ foreach ($mbox_sort as $mbox_num => $mbox_row) {
}
$date = $val[0]->date;
+ $date = preg_replace("/\([^\)]+\)/","",$date);
+ $date = trim($date);
$date = strtotime($date);
$date = time_elapsed_string($date);
diff --git a/read.php b/read.php
index b5bb4d0..a316948 100644
--- a/read.php
+++ b/read.php
@@ -21,7 +21,8 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$header_toaddress = htmlentities($header_toaddress,ENT_QUOTES);
$header_date = header_mime2text($header->date);
-
+ $header_date = preg_replace("/\([^\)]+\)/","",$header_date);
+ $header_date = trim($header_date);
$header_date_age = time_elapsed_string(strtotime($header_date));
$header_ccaddress = header_mime2text($header->ccaddress);