This commit has been accessed 601 times via Git panel.
commit d66ba64c1b5791850e3c96c7e848ab7c6bf0ec1c
tree cbc914d8f7fcce8eeb4089263a7a784139eb13e0
parent 4e13cccb839cbaa07368d84507fafc6a09c360ac
author Engels Antonio <engels@majcms.org> 1318270998 +0800
committer Engels Antonio <engels@majcms.org> 1318270998 +0800
Fix imap_sort usage for PHP 5.3.8
diff --git a/inbox.php b/inbox.php
index 41ccd57..0000910 100644
--- a/inbox.php
+++ b/inbox.php
@@ -33,7 +33,6 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
}
-
if ($hdr = imap_check($mbox)) {
$msgCount = $hdr->Nmsgs;
}
@@ -50,7 +49,6 @@ else {
imap_headers($mbox);
-
if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
$imap_search_query = $_POST['imap_search_query'];
@@ -66,10 +64,9 @@ if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) a
}
}
else {
- $mbox_sort = imap_sort($mbox,"SORTARRIVAL",1);
+ $mbox_sort = imap_sort($mbox,SORTARRIVAL,1);
}
-
/*
$mail_images = glob("images/mail*");
diff --git a/read.php b/read.php
index 4c9a7bc..8a41150 100644
--- a/read.php
+++ b/read.php
@@ -70,7 +70,7 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
}
else {
- $mbox_sort = imap_sort($mbox,"SORTARRIVAL",1);
+ $mbox_sort = imap_sort($mbox,SORTARRIVAL,1);
}
$mbox_row = array_search($msgno, $mbox_sort);
@@ -307,16 +307,6 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$struct = imap_fetchstructure($mbox, $msgno);
-//print_r($struct->parts);
-
-/*
-foreach ($struct->parts as $structP) {
- $structP2 = $structP->parts;
- echo "<br>";
- print_r($structP2);
- echo "<br><br>";
-}
-*/
$contentParts = count($struct->parts);
for ($n = 0; $n <= $contentParts; $n++) {
tree cbc914d8f7fcce8eeb4089263a7a784139eb13e0
parent 4e13cccb839cbaa07368d84507fafc6a09c360ac
author Engels Antonio <engels@majcms.org> 1318270998 +0800
committer Engels Antonio <engels@majcms.org> 1318270998 +0800
Fix imap_sort usage for PHP 5.3.8
diff --git a/inbox.php b/inbox.php
index 41ccd57..0000910 100644
--- a/inbox.php
+++ b/inbox.php
@@ -33,7 +33,6 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
}
-
if ($hdr = imap_check($mbox)) {
$msgCount = $hdr->Nmsgs;
}
@@ -50,7 +49,6 @@ else {
imap_headers($mbox);
-
if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
$imap_search_query = $_POST['imap_search_query'];
@@ -66,10 +64,9 @@ if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) a
}
}
else {
- $mbox_sort = imap_sort($mbox,"SORTARRIVAL",1);
+ $mbox_sort = imap_sort($mbox,SORTARRIVAL,1);
}
-
/*
$mail_images = glob("images/mail*");
diff --git a/read.php b/read.php
index 4c9a7bc..8a41150 100644
--- a/read.php
+++ b/read.php
@@ -70,7 +70,7 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
}
else {
- $mbox_sort = imap_sort($mbox,"SORTARRIVAL",1);
+ $mbox_sort = imap_sort($mbox,SORTARRIVAL,1);
}
$mbox_row = array_search($msgno, $mbox_sort);
@@ -307,16 +307,6 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$struct = imap_fetchstructure($mbox, $msgno);
-//print_r($struct->parts);
-
-/*
-foreach ($struct->parts as $structP) {
- $structP2 = $structP->parts;
- echo "<br>";
- print_r($structP2);
- echo "<br><br>";
-}
-*/
$contentParts = count($struct->parts);
for ($n = 0; $n <= $contentParts; $n++) {