diff options
author | Andrew Dolgov <[email protected]> | 2012-11-01 00:17:55 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-11-01 00:17:55 +0400 |
commit | fd087799fd8ca7d3c858d2d0d7212811f287742d (patch) | |
tree | e48c981c426cdc13951066cc344690ece2dc4286 | |
parent | b926f387505af6501a4afa310085880224204832 (diff) |
tweak opml import/export according to OPML spec
-rw-r--r-- | classes/opml.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/classes/opml.php b/classes/opml.php index 41f48df0c..12beb991b 100644 --- a/classes/opml.php +++ b/classes/opml.php @@ -71,7 +71,7 @@ class Opml extends Handler_Protected { $cat_title = db_fetch_result($result, 0, "title"); } - if ($cat_title) $out .= "<outline title=\"$cat_title\">\n"; + if ($cat_title) $out .= "<outline text=\"$cat_title\">\n"; $result = db_query($this->link, "SELECT id,title FROM ttrss_feed_categories WHERE @@ -129,7 +129,7 @@ class Opml extends Handler_Protected { # export tt-rss settings if ($include_settings) { - $out .= "<outline title=\"tt-rss-prefs\" schema-version=\"".SCHEMA_VERSION."\">"; + $out .= "<outline text=\"tt-rss-prefs\" schema-version=\"".SCHEMA_VERSION."\">"; $result = db_query($this->link, "SELECT pref_name, value FROM ttrss_user_prefs WHERE profile IS NULL AND owner_uid = " . $_SESSION["uid"] . " ORDER BY pref_name"); @@ -143,7 +143,7 @@ class Opml extends Handler_Protected { $out .= "</outline>"; - $out .= "<outline title=\"tt-rss-labels\" schema-version=\"".SCHEMA_VERSION."\">"; + $out .= "<outline text=\"tt-rss-labels\" schema-version=\"".SCHEMA_VERSION."\">"; $result = db_query($this->link, "SELECT * FROM ttrss_labels2 WHERE owner_uid = " . $_SESSION['uid']); @@ -159,7 +159,7 @@ class Opml extends Handler_Protected { $out .= "</outline>"; - $out .= "<outline title=\"tt-rss-filters\" schema-version=\"".SCHEMA_VERSION."\">"; + $out .= "<outline text=\"tt-rss-filters\" schema-version=\"".SCHEMA_VERSION."\">"; $result = db_query($this->link, "SELECT * FROM ttrss_filters2 WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY id"); @@ -386,7 +386,7 @@ class Opml extends Handler_Protected { $default_cat_id = (int) get_feed_category($this->link, 'Imported feeds', false); if ($root_node) { - $cat_title = db_escape_string($root_node->attributes->getNamedItem('title')->nodeValue); + $cat_title = db_escape_string($root_node->attributes->getNamedItem('text')->nodeValue); if (!in_array($cat_title, array("tt-rss-filters", "tt-rss-labels", "tt-rss-prefs"))) { $cat_id = get_feed_category($this->link, $cat_title, $parent_id); @@ -415,7 +415,7 @@ class Opml extends Handler_Protected { foreach ($outlines as $node) { if ($node->hasAttributes() && strtolower($node->tagName) == "outline") { $attrs = $node->attributes; - $node_cat_title = db_escape_string($attrs->getNamedItem('title')->nodeValue); + $node_cat_title = db_escape_string($attrs->getNamedItem('text')->nodeValue); $node_feed_url = db_escape_string($attrs->getNamedItem('xmlUrl')->nodeValue); if ($node_cat_title && !$node_feed_url) { |