From fca236dc6d6ff6e09182c560f3566904cbc7a70a Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Tue, 23 Oct 2012 18:29:43 +0200 Subject: affichage par catégories + meilleur exportation opml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/configureController.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'app/controllers/configureController.php') 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')); } -- cgit v1.2.3