/** Display saved searches */ public function savedsearchesAction() { $allowed = array('fa', 'flos', 'admin'); if (in_array($this->getRole(), $allowed)) { $private = 1; } else { $private = NULL; } $searches = new SavedSearches(); if ($this->_getParam('by') == 'me') { $data = $searches->getSavedSearches($this->getIdentityForForms(), $this->_getParam('page'), $private); } else { $data = $searches->getSavedSearches(NULL, $this->_getParam('page'), $private); } $this->view->data = $data; }