diff options
author | Andrew Dolgov <[email protected]> | 2005-11-25 18:34:34 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-11-25 18:34:34 +0100 |
commit | fa7b87490166af3d8f987bc4d9edad3b38a2237b (patch) | |
tree | 19ce181961f708cf3e0a3365ef3582cab54c59cf /opml.php | |
parent | a90005e6a4caa3beb379c987bd9feefa7edabc38 (diff) |
more opml export tweaks, tiny category detection tweak on import
Diffstat (limited to 'opml.php')
-rw-r--r-- | opml.php | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -36,8 +36,7 @@ if (get_pref($link, 'ENABLE_FEED_CATS')) { $cat_mode = true; $result = db_query($link, "SELECT - ttrss_feeds.feed_url AS feed_url, - ttrss_feeds.title AS title, + title,feed_url,site_url, (SELECT title FROM ttrss_feed_categories WHERE id = cat_id) as cat_title FROM ttrss_feeds WHERE @@ -53,6 +52,7 @@ while ($line = db_fetch_assoc($result)) { $title = htmlspecialchars($line["title"]); $url = htmlspecialchars($line["feed_url"]); + $site_url = htmlspecialchars($line["site_url"]); if ($cat_mode) { $cat_title = htmlspecialchars($line["cat_title"]); @@ -70,7 +70,13 @@ } } - print "<outline text=\"$title\" xmlUrl=\"$url\"/>\n"; + if ($site_url) { + $html_url_qpart = "htmlUrl=\"$site_url\""; + } else { + $html_url_qpart = ""; + } + + print "<outline text=\"$title\" xmlUrl=\"$url\" $html_url_qpart/>\n"; } if ($cat_mode && $old_cat_title) { @@ -116,7 +122,7 @@ $cat_title = db_escape_string($outline->get_attribute('title')); $feed_url = db_escape_string($outline->get_attribute('xmlUrl')); - if ($cat_title) { + if ($cat_title && !$feed_url) { db_query($link, "BEGIN"); |