aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/configureController.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-23 18:29:43 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-23 18:29:43 +0200
commitfca236dc6d6ff6e09182c560f3566904cbc7a70a (patch)
tree850bfab52359702dad2a9eccd03f01b5c68c9bcb /app/controllers/configureController.php
parent9a95cb844e80512205c519da69ec373e046b7f52 (diff)
affichage par catégories + meilleur exportation opml
Diffstat (limited to 'app/controllers/configureController.php')
-rwxr-xr-xapp/controllers/configureController.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/app/controllers/configureController.php b/app/controllers/configureController.php
index c501e5242..e61eb3872 100755
--- a/app/controllers/configureController.php
+++ b/app/controllers/configureController.php
@@ -99,12 +99,21 @@ class configureController extends ActionController {
header('Content-type: text/xml');
$feedDAO = new FeedDAO ();
- $this->view->feeds = $feedDAO->listFeeds ();
- } elseif (Request::isPost ()) {
+ $catDAO = new CategoryDAO ();
+
+ $list = array ();
+ foreach ($catDAO->listCategories () as $key => $cat) {
+ $list[$key]['name'] = $cat->name ();
+ $list[$key]['feeds'] = $feedDAO->listByCategory ($cat->id ());
+ }
+
+ $this->view->categories = $list;
+ } elseif ($this->view->req == 'import' && Request::isPost ()) {
if ($_FILES['file']['error'] == 0) {
$content = file_get_contents ($_FILES['file']['tmp_name']);
$feeds = opml_import ($content);
+ Request::_param ('q');
Request::_param ('feeds', $feeds);
Request::forward (array ('c' => 'feed', 'a' => 'massiveInsert'));
}