From 244026874aba991e7feb37f74a61b192f1bda5ac Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 17 Apr 2013 19:24:21 +0200 Subject: Fix issue #61 : amélioration import OPML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/lib_rss.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/lib_rss.php') diff --git a/lib/lib_rss.php b/lib/lib_rss.php index b9202755b..81a98590e 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -124,7 +124,11 @@ function opml_import ($xml) { } if ($title) { - $cat = new Category ($title); + $catDAO = new CategoryDAO (); + $cat = $catDAO->searchByName ($title); + if ($cat === false) { + $cat = new Category ($title); + } $categories[] = $cat; $feeds = array_merge ($feeds, getFeedsOutline ($outline, $cat->id ())); -- cgit v1.2.3