1: <?php
2: /**
3: * Copyright 2012-2014 Horde LLC (http://www.horde.org/)
4: *
5: * See the enclosed file COPYING for license information (GPL). If you
6: * did not receive this file, see http://www.horde.org/licenses/gpl.
7: *
8: * @category Horde
9: * @copyright 2012-2014 Horde LLC
10: * @license http://www.horde.org/licenses/gpl GPL
11: * @package IMP
12: */
13:
14: /**
15: * Defines AJAX actions used in the IMP advanced search page.
16: *
17: * @author Michael Slusarz <slusarz@horde.org>
18: * @category Horde
19: * @copyright 2012-2014 Horde LLC
20: * @license http://www.horde.org/licenses/gpl GPL
21: * @package IMP
22: */
23: class IMP_Ajax_Application_Handler_Search extends Horde_Core_Ajax_Application_Handler
24: {
25: /**
26: * AJAX action: Create mailbox select list for advanced search page.
27: *
28: * Variables used:
29: * - unsub: (integer) If set, includes unsubscribed mailboxes.
30: *
31: * @return object An object with the following entries:
32: * - mbox_list: (array)
33: * - tree: (string)
34: */
35: public function searchMailboxList()
36: {
37: $ob = $GLOBALS['injector']->getInstance('IMP_Search_Ui')->getSearchMboxList($this->vars->unsub);
38:
39: $result = new stdClass;
40: $result->mbox_list = $ob->mbox_list;
41: $result->tree = $ob->tree->getTree();
42:
43: return $result;
44: }
45:
46: }
47: