This commit has been accessed 606 times via Git panel.
commit 848eb123d9531960e9d1d7e09c9379ed4474c557
tree 7c0b70fc9358e0f5c28b6a7909fc311650cbcbee
parent 0ccf6a40abbf0ee8a547810ac6923372b748d736
author Engels Antonio <engels@majcms.org> 1352112133 +0800
committer Engels Antonio <engels@majcms.org> 1352112133 +0800
Add missing subject and message content placeholders
diff --git a/inbox.php b/inbox.php
index 0261eb6..e263b7b 100644
--- a/inbox.php
+++ b/inbox.php
@@ -232,11 +232,15 @@ foreach ($mbox_sort as $mbox_num => $mbox_row) {
echo "</td></form>";
echo "<td>$from</td>";
+
+ if (strlen($subj) == 0) {
+ $subj = "(No Subject)";
+ }
echo "<td>$subj</td>";
if ($dalt == "") {
- echo "<td align=\"center\"><nobr>no date</nobr></td>";
+ echo "<td align=\"center\"><nobr>(No Date)</nobr></td>";
}
else {
echo "<td align=\"center\" onmouseover=\"document.getElementById('$msgno').innerHTML='$dalt';\" onmouseout=\"document.getElementById('$msgno').innerHTML='$date';\"><nobr id=\"$msgno\">$date</nobr></td>";
diff --git a/read.php b/read.php
index 1791571..cddf4af 100644
--- a/read.php
+++ b/read.php
@@ -94,6 +94,10 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$msgno_next = $mbox_sort[$mbox_row_prev];
$msgno_prev = $mbox_sort[$mbox_row_next];
+
+ if (strlen($header_subject) == 0) {
+ $header_subject = "(No Subject)";
+ }
echo "<title>Kartero - $folder - $header_subject</title>";
@@ -466,6 +470,10 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$msgBody = mb_convert_encoding($msgBody,"UTF-8","auto");
$msgBody = mb_convert_encoding($msgBody,"UTF-8","UTF-8");
+ if (strlen($msgBody) == 0) {
+ $msgBody = "This message has no content.";
+ }
+
$get_fromaddress = extract_emails_from($header->fromaddress);
$get_fromaddress = explode("@",$get_fromaddress[0]);
tree 7c0b70fc9358e0f5c28b6a7909fc311650cbcbee
parent 0ccf6a40abbf0ee8a547810ac6923372b748d736
author Engels Antonio <engels@majcms.org> 1352112133 +0800
committer Engels Antonio <engels@majcms.org> 1352112133 +0800
Add missing subject and message content placeholders
diff --git a/inbox.php b/inbox.php
index 0261eb6..e263b7b 100644
--- a/inbox.php
+++ b/inbox.php
@@ -232,11 +232,15 @@ foreach ($mbox_sort as $mbox_num => $mbox_row) {
echo "</td></form>";
echo "<td>$from</td>";
+
+ if (strlen($subj) == 0) {
+ $subj = "(No Subject)";
+ }
echo "<td>$subj</td>";
if ($dalt == "") {
- echo "<td align=\"center\"><nobr>no date</nobr></td>";
+ echo "<td align=\"center\"><nobr>(No Date)</nobr></td>";
}
else {
echo "<td align=\"center\" onmouseover=\"document.getElementById('$msgno').innerHTML='$dalt';\" onmouseout=\"document.getElementById('$msgno').innerHTML='$date';\"><nobr id=\"$msgno\">$date</nobr></td>";
diff --git a/read.php b/read.php
index 1791571..cddf4af 100644
--- a/read.php
+++ b/read.php
@@ -94,6 +94,10 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$msgno_next = $mbox_sort[$mbox_row_prev];
$msgno_prev = $mbox_sort[$mbox_row_next];
+
+ if (strlen($header_subject) == 0) {
+ $header_subject = "(No Subject)";
+ }
echo "<title>Kartero - $folder - $header_subject</title>";
@@ -466,6 +470,10 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$msgBody = mb_convert_encoding($msgBody,"UTF-8","auto");
$msgBody = mb_convert_encoding($msgBody,"UTF-8","UTF-8");
+ if (strlen($msgBody) == 0) {
+ $msgBody = "This message has no content.";
+ }
+
$get_fromaddress = extract_emails_from($header->fromaddress);
$get_fromaddress = explode("@",$get_fromaddress[0]);