projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for bug on filters plugin which allows user to select INBOX as a
[squirrelmail.git]
/
plugins
/
filters
/
filters.php
diff --git
a/plugins/filters/filters.php
b/plugins/filters/filters.php
index fdc7fd8021015af11ab9fe6e5bf8c54c4e98869a..3c80671e65a33d8337c9c6ce1e6ca440c39c0571 100644
(file)
--- a/
plugins/filters/filters.php
+++ b/
plugins/filters/filters.php
@@
-19,7
+19,7
@@
* Also view plugins/README.plugins for more information.
*
* @version $Id$
* Also view plugins/README.plugins for more information.
*
* @version $Id$
- * @copyright (c) 1999-200
4
The SquirrelMail Project Team
+ * @copyright (c) 1999-200
5
The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @package plugins
* @subpackage filters
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @package plugins
* @subpackage filters
@@
-210,6
+210,11
@@
function filter_search_and_delete($imap_stream, $where, $what, $where_to, $user_
$should_expunge) {
global $languages, $squirrelmail_language, $allow_charset_search, $imap_server_type;
$should_expunge) {
global $languages, $squirrelmail_language, $allow_charset_search, $imap_server_type;
+ if (strtolower($where_to) == 'inbox') {
+ return array();
+ }
+
+
if ($user_scan == 'new') {
$category = 'UNSEEN';
} else {
if ($user_scan == 'new') {
$category = 'UNSEEN';
} else {
@@
-231,7
+236,8
@@
function filter_search_and_delete($imap_stream, $where, $what, $where_to, $user_
$what = addslashes(trim($what[1]));
}
$what = addslashes(trim($what[1]));
}
- if ($imap_server_type == 'macosx') {
+ // see comments in squirrelmail sqimap_search function
+ if ($imap_server_type == 'macosx' || $imap_server_type == 'hmailserver') {
$search_str .= ' ' . $where . ' ' . $what;
} else {
$search_str .= ' ' . $where . ' {' . strlen($what) . "}\r\n"
$search_str .= ' ' . $where . ' ' . $what;
} else {
$search_str .= ' ' . $where . ' {' . strlen($what) . "}\r\n"
@@
-792,4
+798,4
@@
function do_error($string) {
echo $string;
echo "</font></p>\n";
}
echo $string;
echo "</font></p>\n";
}
-?>
\ No newline at end of file
+?>