diff options
Diffstat (limited to 'app/controllers')
| -rwxr-xr-x | app/controllers/configureController.php | 9 | ||||
| -rwxr-xr-x | app/controllers/feedController.php | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/app/controllers/configureController.php b/app/controllers/configureController.php index 6ebc13f39..6396dbfeb 100755 --- a/app/controllers/configureController.php +++ b/app/controllers/configureController.php @@ -92,12 +92,18 @@ class configureController extends ActionController { if (Request::isPost () && $this->view->flux) { $name = Request::param ('name', ''); + $hist = Request::param ('keep_history', 'no'); $cat = Request::param ('category', 0); $path = Request::param ('path_entries', ''); $priority = Request::param ('priority', 0); $user = Request::param ('http_user', ''); $pass = Request::param ('http_pass', ''); + $keep_history = false; + if ($hist == 'yes') { + $keep_history = true; + } + $httpAuth = ''; if ($user != '' || $pass != '') { $httpAuth = $user . ':' . $pass; @@ -108,7 +114,8 @@ class configureController extends ActionController { 'category' => $cat, 'pathEntries' => $path, 'priority' => $priority, - 'httpAuth' => $httpAuth + 'httpAuth' => $httpAuth, + 'keep_history' => $keep_history ); if ($feedDAO->updateFeed ($id, $values)) { diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php index 21ea2aadd..18a46f322 100755 --- a/app/controllers/feedController.php +++ b/app/controllers/feedController.php @@ -69,7 +69,8 @@ class feedController extends ActionController { // on ajoute les articles en masse sans vérification foreach ($entries as $entry) { - if ($entry->date (true) >= $date_min) { + if ($entry->date (true) >= $date_min || + $feed->keepHistory ()) { $values = $entry->toArray (); $entryDAO->addEntry ($values); } @@ -150,7 +151,8 @@ class feedController extends ActionController { // La BDD refusera l'ajout de son côté car l'id doit être // unique foreach ($entries as $entry) { - if ($entry->date (true) >= $date_min) { + if ($entry->date (true) >= $date_min || + $feed->keepHistory ()) { $values = $entry->toArray (); $entryDAO->addEntry ($values); } |
