[RCD] Help trying to do a search with only the framework.
thomas at roundcube.net
Fri Apr 17 10:00:04 CEST 2015
On Tue, Apr 14, 2015 at 9:45 PM, Rodrigo Santellan <rsantellan at gmail.com> wrote:
> I'm trying to do a search with only the framework framework. I has been
> trying to separate the component so they can be used on another framework,
> I'm using it now in Symonfony2 but planing to use in another ones.
> So far I identified the class rcube_imap_search that will do the search.
Please note that this class is only a helper class for internal use.
> I created a helper with static methods that I'm rewriting to not use
> On the file RouncubeHelper I create a connection to the IMAP server. My
> problem is that when I try to do the actual search with the method search it
> always come empty.
> What I'm missing? If I'm using only one folder is a good practice to call
> $searchRcube = new \rcube_imap_search(array('skip_deleted' => true),
> $data = $searchRcube->exec(array($folder), $criteria, null, 'date');
> Like that?
In order to execute a search (or any other IMAP operation), you should
use the methods of the rcube_imap instance you get via
rcube::get_storage(). For searching that would be rcube_imap::search()
. See an example how to execute the search in the Roundcube webmail
More information about the dev