summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-25 00:12:18 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-25 00:12:18 +0200
commit6723babdd65d946cdc7e315d7f11fb3ca0e455d3 (patch)
treee45359332c04fc5c935fbedecd1ade50b6430463 /app/controllers
parent4924f4c6d6d03d39471de363b8d368c8edad8f3d (diff)
ajouts graphique + ajout suppression vieux articles
Diffstat (limited to 'app/controllers')
-rwxr-xr-xapp/controllers/configureController.php5
-rwxr-xr-xapp/controllers/feedController.php4
2 files changed, 6 insertions, 3 deletions
diff --git a/app/controllers/configureController.php b/app/controllers/configureController.php
index b382b2794..daabfd3bb 100755
--- a/app/controllers/configureController.php
+++ b/app/controllers/configureController.php
@@ -68,17 +68,20 @@ class configureController extends ActionController {
$view = Request::param ('default_view', 'all');
$display = Request::param ('display_posts', 'no');
$sort = Request::param ('sort_order', 'low_to_high');
+ $old = Request::param ('old_entries', 3);
$this->view->conf->_postsPerPage (intval ($nb));
$this->view->conf->_defaultView ($view);
$this->view->conf->_displayPosts ($display);
$this->view->conf->_sortOrder ($sort);
+ $this->view->conf->_oldEntries ($old);
$values = array (
'posts_per_page' => $this->view->conf->postsPerPage (),
'default_view' => $this->view->conf->defaultView (),
'display_posts' => $this->view->conf->displayPosts (),
- 'sort_order' => $this->view->conf->sortOrder ()
+ 'sort_order' => $this->view->conf->sortOrder (),
+ 'old_entries' => $this->view->conf->oldEntries (),
);
$confDAO = new RSSConfigurationDAO ();
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php
index 6dad1ac08..e728ac3b0 100755
--- a/app/controllers/feedController.php
+++ b/app/controllers/feedController.php
@@ -70,11 +70,11 @@ class feedController extends ActionController {
'id_feed' => $feed->id ()
);
$entryDAO->addEntry ($values);
-
- // TODO gérer suppression des articles trop vieux (à paramétrer)
}
}
+ $entryDAO->cleanOldEntries ($this->view->conf->oldEntries ());
+
Request::forward (array (), true);
}