[dev] [imp] Searching an IMAP mail store with Imp
Michael Rubinsky
mike at theupstairsroom.com
Fri Nov 4 21:24:22 PST 2005
Quoting Michael Slusarz:
> You are right in that the BADCHARSET string is not required. But this
> wasn't the reason why the code wasn't working. turns out that
> _runCommand() was returning false on error instead of the error code.
> So searching for any error return would never return true. i think i
> have fixed this in the code.
I found two problems that were still causing my searches to fail. The
first, in framework/IMAP/IMAP/Search.php I fixed in CVS already, the
parameter ['no_imap_search'] should have been ['no_imap_charset'].
The second item, actually wasn't' causing any problems for me, but I
figured it could be as issue for someone else:
Index: lib/IMAP/Client.php
===================================================================
RCS file: /repository/imp/lib/IMAP/Client.php,v
retrieving revision 1.25
diff -u -r1.25 Client.php
--- lib/IMAP/Client.php 5 Nov 2005 03:31:20 -0000 1.25
+++ lib/IMAP/Client.php 5 Nov 2005 05:11:30 -0000
@@ -714,7 +714,7 @@
function searchCharset($charset)
{
$this->_runCommand('SELECT INBOX');
- $read = $this->_runCommand('SEARCH CHARSET UTF-9 TEXT
"charsettest" 1');
+ $read = $this->_runCommand('SEARCH CHARSET ' . $charset . ' TEXT
"charsettest" 1');
return !is_a($read, 'PEAR_Error');
}
I didn't fix this one as I don't have commit acces to IMP tree.
Hope this helps, and thanks for all the effort, michael!
Mike
> michael
>
> _______________________________________
> Michael Slusarz [slusarz at curecanti.org]
> Thanks -
> Mike
More information about the dev
mailing list