From 5e1109312044b41932e14eb2e8e9ad9497d2ac61 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 4 Nov 2013 20:48:38 +0100 Subject: Détails : blancs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suppression des blancs en fin de ligne --- lib/lib_rss.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/lib_rss.php') diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 41e95fc90..7f22c8244 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -43,17 +43,17 @@ function get_domain ($url) { function opml_export ($cats) { $txt = ''; - + foreach ($cats as $cat) { $txt .= '' . "\n"; - + foreach ($cat['feeds'] as $feed) { $txt .= "\t" . '' . "\n"; } - + $txt .= '' . "\n"; } - + return $txt; } @@ -79,13 +79,13 @@ function opml_import ($xml) { if (!isset ($outline['xmlUrl'])) { // Catégorie $title = ''; - + if (isset ($outline['text'])) { $title = (string) $outline['text']; } elseif (isset ($outline['title'])) { $title = (string) $outline['title']; } - + if ($title) { // Permet d'éviter les soucis au niveau des id : // ceux-ci sont générés en fonction de la date, @@ -99,7 +99,7 @@ function opml_import ($xml) { $cat = new Category ($title); } $categories[] = $cat; - + $feeds = array_merge ($feeds, getFeedsOutline ($outline, $cat->id ())); } } else { @@ -116,7 +116,7 @@ function opml_import ($xml) { */ function getFeedsOutline ($outline, $cat_id) { $feeds = array (); - + foreach ($outline->children () as $child) { if (isset ($child['xmlUrl'])) { $feeds[] = getFeed ($child, $cat_id); @@ -127,7 +127,7 @@ function getFeedsOutline ($outline, $cat_id) { ); } } - + return $feeds; } @@ -149,7 +149,7 @@ function getFeed ($outline, $cat_id) { /* permet de récupérer le contenu d'un article pour un flux qui n'est pas complet */ function get_content_by_parsing ($url, $path) { $html = file_get_contents ($url); - + if ($html) { $doc = phpQuery::newDocument ($html); $content = $doc->find ($path); -- cgit v1.2.3