projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make message details link a non-relative URI. Thanks Thierry Godefroy
[squirrelmail.git]
/
functions
/
imap_asearch.php
diff --git
a/functions/imap_asearch.php
b/functions/imap_asearch.php
index 47d12eb8b0c1f21e874543245062600306ff24d7..8c204ebbbb7c6cb724ada36e99ce8e7a5399307f 100644
(file)
--- a/
functions/imap_asearch.php
+++ b/
functions/imap_asearch.php
@@
-8,7
+8,7
@@
* Subfolder search idea from Patch #806075 by Thomas Pohl xraven at users.sourceforge.net. Thanks Thomas!
*
* @author Alex Lemaresquier - Brainstorm <alex at brainstorm.fr>
* Subfolder search idea from Patch #806075 by Thomas Pohl xraven at users.sourceforge.net. Thanks Thomas!
*
* @author Alex Lemaresquier - Brainstorm <alex at brainstorm.fr>
- * @copyright © 1999-200
5
The SquirrelMail Project Team
+ * @copyright © 1999-200
7
The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
@@
-19,8
+19,8
@@
/** This functionality requires the IMAP and date functions
*/
/** This functionality requires the IMAP and date functions
*/
-require_once(SM_PATH . 'functions/imap_general.php');
-require_once(SM_PATH . 'functions/date.php');
+
//
require_once(SM_PATH . 'functions/imap_general.php');
+
//
require_once(SM_PATH . 'functions/date.php');
/** Set to TRUE to dump the IMAP dialogue
* @global bool $imap_asearch_debug_dump
/** Set to TRUE to dump the IMAP dialogue
* @global bool $imap_asearch_debug_dump
@@
-313,14
+313,12
@@
function sqimap_run_search($imapConnection, $search_string, $search_charset)
$query = 'SEARCH CHARSET "' . strtoupper($search_charset) . '" ' . $search_string;
else
$query = 'SEARCH ' . $search_string;
$query = 'SEARCH CHARSET "' . strtoupper($search_charset) . '" ' . $search_string;
else
$query = 'SEARCH ' . $search_string;
-// s_debug_dump('C:', $query);
- $readin = sqimap_run_command($imapConnection, $query, false, $response, $message, TRUE);
+ $readin = sqimap_run_command_list($imapConnection, $query, false, $response, $message, TRUE);
/* 6.4.4 try US-ASCII charset if we tried an OPTIONAL [CHARSET] and received a tagged NO response (SHOULD be [BADCHARSET]) */
if (($search_charset != '') && (strtoupper($response) == 'NO')) {
$query = 'SEARCH CHARSET US-ASCII ' . $search_string;
/* 6.4.4 try US-ASCII charset if we tried an OPTIONAL [CHARSET] and received a tagged NO response (SHOULD be [BADCHARSET]) */
if (($search_charset != '') && (strtoupper($response) == 'NO')) {
$query = 'SEARCH CHARSET US-ASCII ' . $search_string;
-// s_debug_dump('C:', $query);
- $readin = sqimap_run_command($imapConnection, $query, false, $response, $message, TRUE);
+ $readin = sqimap_run_command_list($imapConnection, $query, false, $response, $message, TRUE);
}
if (strtoupper($response) != 'OK') {
sqimap_asearch_error_box($response, $query, $message);
}
if (strtoupper($response) != 'OK') {
sqimap_asearch_error_box($response, $query, $message);
@@
-438,6
+436,7
@@
function sqimap_asearch($imapConnection, &$mailbox_array, &$biop_array, &$unop_a
$search_string = '';
}
if (isset($where_array[$cur_crit]) && empty($exclude_array[$cur_crit])) {
$search_string = '';
}
if (isset($where_array[$cur_crit]) && empty($exclude_array[$cur_crit])) {
+ $aCriteria = array();
for ($crit = $cur_crit; $crit < count($where_array); $crit++) {
$criteria = trim(sqimap_asearch_build_criteria($where_array[$crit], $what_array[$crit], $search_charset));
if (!empty($criteria) && empty($exclude_array[$crit])) {
for ($crit = $cur_crit; $crit < count($where_array); $crit++) {
$criteria = trim(sqimap_asearch_build_criteria($where_array[$crit], $what_array[$crit], $search_charset));
if (!empty($criteria) && empty($exclude_array[$crit])) {
@@
-487,5
+486,3
@@
function sqimap_asearch($imapConnection, &$mailbox_array, &$biop_array, &$unop_a
}
return ($mbox_search);
}
}
return ($mbox_search);
}
-
-?>