From 9a95cb844e80512205c519da69ec373e046b7f52 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Mon, 22 Oct 2012 23:41:56 +0200 Subject: Début gestion import (non fonctionnel) / export (presque fonctionnel) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/lib_rss.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/lib_rss.php') diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 0cfecf3f3..c695b64b7 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -68,3 +68,20 @@ function sortEntriesByDate ($entry1, $entry2) { function sortReverseEntriesByDate ($entry1, $entry2) { return $entry1->date (true) - $entry2->date (true); } + +function opml_export ($feeds) { + // TODO gérer les catégories + $txt = '' . "\n"; + + foreach ($feeds as $feed) { + $txt .= "\t" . '' . "\n"; + } + + $txt .= '' . "\n"; + + return $txt; +} + +function opml_import ($xml) { + // TODO +} -- cgit v1.2.3