diff options
Diffstat (limited to 'classes/opml.php')
-rw-r--r-- | classes/opml.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/classes/opml.php b/classes/opml.php index 6c7cab606..f8e9f6728 100644 --- a/classes/opml.php +++ b/classes/opml.php @@ -31,7 +31,7 @@ class OPML extends Handler_Protected { <body class='claro ttrss_utility'> <h1>".__('OPML Utility')."</h1><div class='content'>"; - Feeds::_add_cat("Imported feeds"); + Feeds::_add_cat("Imported feeds", $owner_uid); $this->opml_notice(__("Importing OPML...")); @@ -151,7 +151,7 @@ class OPML extends Handler_Protected { # export tt-rss settings if ($include_settings) { - $out .= "<outline text=\"tt-rss-prefs\" schema-version=\"".SCHEMA_VERSION."\">"; + $out .= "<outline text=\"tt-rss-prefs\" schema-version=\"".Config::SCHEMA_VERSION."\">"; $sth = $this->pdo->prepare("SELECT pref_name, value FROM ttrss_user_prefs2 WHERE profile IS NULL AND owner_uid = ? ORDER BY pref_name"); @@ -166,7 +166,7 @@ class OPML extends Handler_Protected { $out .= "</outline>"; - $out .= "<outline text=\"tt-rss-labels\" schema-version=\"".SCHEMA_VERSION."\">"; + $out .= "<outline text=\"tt-rss-labels\" schema-version=\"".Config::SCHEMA_VERSION."\">"; $sth = $this->pdo->prepare("SELECT * FROM ttrss_labels2 WHERE owner_uid = ?"); @@ -183,7 +183,7 @@ class OPML extends Handler_Protected { $out .= "</outline>"; - $out .= "<outline text=\"tt-rss-filters\" schema-version=\"".SCHEMA_VERSION."\">"; + $out .= "<outline text=\"tt-rss-filters\" schema-version=\"".Config::SCHEMA_VERSION."\">"; $sth = $this->pdo->prepare("SELECT * FROM ttrss_filters2 WHERE owner_uid = ? ORDER BY id"); @@ -521,9 +521,8 @@ class OPML extends Handler_Protected { if ($cat_id === false) { $order_id = (int) $root_node->attributes->getNamedItem('ttrssSortOrder')->nodeValue; - if (!$order_id) $order_id = 0; - Feeds::_add_cat($cat_title, $parent_id, $order_id); + Feeds::_add_cat($cat_title, $_SESSION['uid'], $parent_id ? $parent_id : null, (int)$order_id); $cat_id = $this->get_feed_category($cat_title, $parent_id); } @@ -635,7 +634,7 @@ class OPML extends Handler_Protected { } static function get_publish_url(){ - return get_self_url_prefix() . + return Config::get_self_url() . "/public.php?op=publishOpml&key=" . Feeds::_get_access_key('OPML:Publish', false, $_SESSION["uid"]); } |