diff options
| author | 2013-06-15 13:10:39 +0200 | |
|---|---|---|
| committer | 2013-06-15 13:10:39 +0200 | |
| commit | e5637cb1ed2ff0e284eea0bae32f2e7135c89716 (patch) | |
| tree | c1beabbb415b3bf4849b47d7454d2816c9d9919d | |
| parent | 9e0af957d4eeb7bb9e2abdd7a45d1a21e0b3cfdb (diff) | |
Fix issue #88 : possibilité d'importer (OPML) des flux sans catégorie
| -rw-r--r-- | lib/lib_rss.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 77d3ac2db..772003089 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -68,6 +68,9 @@ function opml_import ($xml) { throw new OpmlException (); } + $catDAO = new CategoryDAO(); + $defCat = $catDAO->getDefault(); + $categories = array (); $feeds = array (); @@ -99,8 +102,8 @@ function opml_import ($xml) { $feeds = array_merge ($feeds, getFeedsOutline ($outline, $cat->id ())); } } else { - // Flux rss - $feeds[] = getFeed ($outline, ''); + // Flux rss sans catégorie, on récupère l'ajoute dans la catégorie par défaut + $feeds[] = getFeed ($outline, $defCat->id()); } } |
