From bf24aa601f96d184f9635fa72377d7521b324b4f Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 20 Mar 2013 22:56:17 +0100 Subject: Ajout controller Rss pour export au format RSS (très très basique) #34 + ajout lib text pour gérer le bbcode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/rssController.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 app/controllers/rssController.php (limited to 'app/controllers/rssController.php') diff --git a/app/controllers/rssController.php b/app/controllers/rssController.php new file mode 100755 index 000000000..1f66f4517 --- /dev/null +++ b/app/controllers/rssController.php @@ -0,0 +1,35 @@ +view->_useLayout (false); + } + + public function publicAction () { + $entryDAO = new EntryDAO (); + $entryDAO->_nbItemsPerPage (-1); + + $items = $entryDAO->listPublic ('low_to_high'); + + try { + $page = Request::param('page', 1); + $nb = Request::param('nb', 15); + $this->view->itemPaginator = new Paginator($items); + $this->view->itemPaginator->_nbItemsPerPage($nb); + $this->view->itemPaginator->_currentPage($page); + } catch(CurrentPagePaginationException $e) { + Error::error( + 404, + array('error' => array('La page que vous cherchez n\'existe pas')) + ); + } + } + + public function getNbNotReadAction() { + } +} -- cgit v1.2.3