]> git.wh0rd.org - tt-rss.git/commitdiff
rework OPML display in pref-feeds; hide authenticated feeds from public OPML
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 30 Jun 2010 09:13:57 +0000 (13:13 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 30 Jun 2010 09:13:57 +0000 (13:13 +0400)
modules/pref-feeds.php
opml.php

index c0d436cecef4564b35e9b67ce35d899c6d75cf7c..5920348d45e7be7c7569148b59ed7e78fae0cb03 100644 (file)
 
                print "<p>" . __("Using OPML you can export and import your feeds and Tiny Tiny RSS settings.");
 
+               print "<div class=\"insensitive\">" . __("Note: only main settings profile can be migrated using OPML.") . "</div>";
+
                print "</p>";
 
                print "<iframe name=\"upload_iframe\"
                print "<button onclick=\"gotoExportOpml()\">".
                        __('Export OPML')."</button>";
 
+               if (!get_pref($link, "_PREFS_OPML_PUBLISH_KEY")){
+                       set_pref($link, "_PREFS_OPML_PUBLISH_KEY", generate_publish_key());
+               }
+
+               print "<p>".__('Your OPML can be published publicly and can be subscribed by anyone who knows the URL below.');
+
+               print "<div class=\"insensitive\">" . __("Note: Published OPML does not include your Tiny Tiny RSS settings, feeds that require authentication or feeds hidden from Popular feeds.") .                  "</div>" . "</p>";
 
-               print "<h3>" . __("Firefox Integration") . "</h3>";
+               print "<button onclick=\"return displayDlg('pubOPMLUrl')\">".
+                       __('Display URL')."</button> ";
+
+
+               if (strpos($_SERVER['HTTP_USER_AGENT'], "Firefox") !== false) {
+       
+                       print "<h3>" . __("Firefox Integration") . "</h3>";
                 
-               print "<p>" . __('This Tiny Tiny RSS site can be used as a Firefox Feed Reader by clicking the link below.') . "</p>";
+                       print "<p>" . __('This Tiny Tiny RSS site can be used as a Firefox Feed Reader by clicking the link below.') . "</p>";
 
-               print "<p";
+                       print "<p";
 
-               print "<button onclick='window.navigator.registerContentHandler(" .
+                       print "<button onclick='window.navigator.registerContentHandler(" .
                       "\"application/vnd.mozilla.maybe.feed\", " .
                       "\"" . add_feed_url() . "\", " . " \"Tiny Tiny RSS\")'>" .
                                                         __('Click here to register this site as a feed reader.') . 
                                "</button>";
 
-               print "</p>";
+                       print "</p>";
+               }
 
                print "<h3>".__("Published articles")."</h3>";
 
                if (!get_pref($link, "_PREFS_PUBLISH_KEY")) {
                        set_pref($link, "_PREFS_PUBLISH_KEY", generate_publish_key());
                }
-
-                if (!get_pref($link, "_PREFS_OPML_PUBLISH_KEY")){
-                       set_pref($link, "_PREFS_OPML_PUBLISH_KEY", generate_publish_key());
-               }
                
                print "<p>".__('Published articles are exported as a public RSS feed and can be subscribed by anyone who knows the URL specified below.')."</p>";
 
                print "<button onclick=\"return displayDlg('pubUrl')\">".
                        __('Display URL')."</button> ";
-                
-               print "<p>".__('Your OPML can be published publicly and can be subscribed by anyone who knows the URL below.')."</p>";
-
-               print "<button onclick=\"return displayDlg('pubOPMLUrl')\">".
-                       __('Display URL')."</button> ";
-
+               
 
        }
 
index 4524dc3357f976203a97ab63eb38a06532450d7b..35e36d24a351035e95a29ec8b000493620d3d172 100644 (file)
--- a/opml.php
+++ b/opml.php
@@ -33,7 +33,8 @@
                 $where = "WHERE owner_uid = '$owner_uid'";
                 $orderby = "ORDER BY title";
                if ($hide_private_feeds){
-                       $where = "WHERE owner_uid = '$owner_uid' AND private IS false";
+                       $where = "WHERE owner_uid = '$owner_uid' AND private IS false AND 
+                               auth_login = '' AND auth_pass = ''";
                }