1: <?php
2: 3: 4:
5: class Whups_Block_Myqueries extends Horde_Core_Block
6: {
7: 8:
9: public function __construct($app, $params = array())
10: {
11: parent::__construct($app, $params);
12:
13: $this->_name = _("Saved Queries");
14: }
15:
16: 17:
18: protected function _content()
19: {
20: $qManager = new Whups_Query_Manager();
21: $queries = $qManager->listQueries($GLOBALS['registry']->getAuth(), true);
22: $myqueries = new Whups_View_SavedQueries(
23: array('results' => $queries));
24: Horde::startBuffer();
25: $myqueries->html(false);
26: $html = Horde::endBuffer();
27: if ($html) {
28: return $html;
29: }
30:
31: return '<p><em>' . _("No queries have been saved.") . '</em></p>';
32: }
33:
34: }
35: