From f29033f86c41349237a9619137207083ea43a371 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 8 Nov 2010 19:30:00 +0300 Subject: [PATCH] fix OPML publishing (2) --- modules/backend-rpc.php | 2 +- modules/popup-dialog.php | 6 +++++- modules/pref-feeds.php | 5 ----- 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 ""; - 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 ""; 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 "
".__('Public OPML URL')."
"; print "
"; - + + 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 ""; - if (!get_pref($link, "_PREFS_OPML_PUBLISH_KEY")){ - set_pref($link, "_PREFS_OPML_PUBLISH_KEY", - sha1(uniqid(rand(), true))); - } - print "

".__('Your OPML can be published publicly and can be subscribed by anyone who knows the URL below.'); print "

" . __("Note: Published OPML does not include your Tiny Tiny RSS settings, feeds that require authentication or feeds hidden from Popular feeds.") . "
" . "

";