blob: 1f66f45170646606e776ffd57e26bae015081263 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<?php
class rssController extends ActionController {
public function firstAction() {
header('Content-Type: text/xml');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
$this->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() {
}
}
|