]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix OPML publishing (2)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 8 Nov 2010 16:30:00 +0000 (19:30 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 8 Nov 2010 16:30:00 +0000 (19:30 +0300)
modules/backend-rpc.php
modules/popup-dialog.php
modules/pref-feeds.php

index 844afaddf4342ad23498c412a08693813591ff58..cd1bcb84bdf46e070f43a9deaf6316144a477d07 100644 (file)
                if ($subop == "regenOPMLKey") {
 
                        print "<rpc-reply>";
-                       set_pref($link, " _PREFS_PUBLISH_KEY", 
+                       set_pref($link, "_PREFS_PUBLISH_KEY", 
                                sha1(uniqid(rand(), true)), $_SESSION["uid"]);
                        $new_link = opml_publish_url($link);            
                        print "<link><![CDATA[$new_link]]></link>";
index 4c8c92b5435b7f90b152c1b5bcf9da03534ac5e2..77cf46edeac33c3dda4b3b7d077eca50133ab20a 100644 (file)
 
                        print "<div id=\"infoBoxTitle\">".__('Public OPML URL')."</div>";
                        print "<div class=\"infoBoxContents\">";
-       
+
+                       if (!get_pref($link, "_PREFS_PUBLISH_KEY"))
+                               set_pref($link, "_PREFS_PUBLISH_KEY", 
+                                       sha1(uniqid(rand(), true)));
+
                        $url_path = opml_publish_url($link);
 
                        print __("Your Public OPML URL is:");
index 30046ddb9a67753e97681b9fb41736962d858854..68fb7717262222a083925842b238c66f5de12ba6 100644 (file)
                print "<button onclick=\"gotoExportOpml()\">".
                        __('Export OPML')."</button>";
 
-               if (!get_pref($link, "_PREFS_OPML_PUBLISH_KEY")){
-                       set_pref($link, "_PREFS_OPML_PUBLISH_KEY", 
-                               sha1(uniqid(rand(), true)));
-               }
-
                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>";