diff options
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index c574cd3fd..772003089 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -65,9 +65,12 @@ function opml_import ($xml) { $opml = @simplexml_load_string ($xml); if (!$opml) { - return array (array (), array ()); + 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()); } } |
