/** * This action displays logs of FreshRSS for the current user. */ public function logsAction() { if (!FreshRSS_Auth::hasAccess()) { Minz_Error::error(403); } Minz_View::prependTitle(_t('index.log.title') . ' · '); if (Minz_Request::isPost()) { FreshRSS_LogDAO::truncate(); } $logs = FreshRSS_LogDAO::lines(); //TODO: ask only the necessary lines //gestion pagination $page = Minz_Request::param('page', 1); $this->view->logsPaginator = new Minz_Paginator($logs); $this->view->logsPaginator->_nbItemsPerPage(50); $this->view->logsPaginator->_currentPage($page); }
public function logsAction() { if (!$this->view->loginOk) { Minz_Error::error(403, array('error' => array(Minz_Translate::t('access_denied')))); } Minz_View::prependTitle(Minz_Translate::t('logs') . ' · '); if (Minz_Request::isPost()) { FreshRSS_LogDAO::truncate(); } $logs = FreshRSS_LogDAO::lines(); //TODO: ask only the necessary lines //gestion pagination $page = Minz_Request::param('page', 1); $this->view->logsPaginator = new Minz_Paginator($logs); $this->view->logsPaginator->_nbItemsPerPage(50); $this->view->logsPaginator->_currentPage($page); }