configureController.php 846 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. class configureController extends ActionController {
  3. public function categorizeAction () {
  4. }
  5. public function fluxAction () {
  6. }
  7. public function displayAction () {
  8. if (Request::isPost ()) {
  9. $nb = Request::param ('posts_per_page', 10);
  10. $view = Request::param ('default_view', 'all');
  11. $display = Request::param ('display_posts', 'no');
  12. $this->view->conf->_postsPerPage (intval ($nb));
  13. $this->view->conf->_defaultView ($view);
  14. $this->view->conf->_displayPosts ($display);
  15. $values = array (
  16. 'posts_per_page' => $this->view->conf->postsPerPage (),
  17. 'default_view' => $this->view->conf->defaultView (),
  18. 'display_posts' => $this->view->conf->displayPosts ()
  19. );
  20. $confDAO = new RSSConfigurationDAO ();
  21. $confDAO->save ($values);
  22. Session::_param ('conf', $this->view->conf);
  23. }
  24. }
  25. }