summaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-07-04 19:38:29 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-07-04 19:38:29 +0200
commiteb5f05304c253df90873b94ba52d7093115f3850 (patch)
tree1152ab618aa5cf884a1f2f2e2d1926da4167a6be /lib/lib_rss.php
parent8dd5fd51f74a47e5c80052f27a74cdcd5dd044b9 (diff)
parentb5f233f6d524ca9f74e9d33bf5692a1a678d7fec (diff)
Merge branch 'dev'0.4.0
Diffstat (limited to 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php9
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());
}
}