summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-08 19:30:00 +0300
committerAndrew Dolgov <[email protected]>2010-11-08 19:30:00 +0300
commitf29033f86c41349237a9619137207083ea43a371 (patch)
treed927fe34938dc32932fdacad851a428358d1678c
parente5075c10230b7ffb4f4aa8785e1af4b7a6ef177f (diff)
fix OPML publishing (2)
-rw-r--r--modules/backend-rpc.php2
-rw-r--r--modules/popup-dialog.php6
-rw-r--r--modules/pref-feeds.php5
3 files changed, 6 insertions, 7 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index 844afaddf..cd1bcb84b 100644
--- a/modules/backend-rpc.php
+++ b/modules/backend-rpc.php
@@ -467,7 +467,7 @@
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>";
diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php
index 4c8c92b54..77cf46ede 100644
--- a/modules/popup-dialog.php
+++ b/modules/popup-dialog.php
@@ -162,7 +162,11 @@
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:");
diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php
index 30046ddb9..68fb77172 100644
--- a/modules/pref-feeds.php
+++ b/modules/pref-feeds.php
@@ -1446,11 +1446,6 @@
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>";