]> git.wh0rd.org - tt-rss.git/blobdiff - modules/backend-rpc.php
make published OPML use common secret key code
[tt-rss.git] / modules / backend-rpc.php
index cd1bcb84bdf46e070f43a9deaf6316144a477d07..7ccb30692bc7c1723c52cb6632be9b4837cb5731 100644 (file)
                if ($subop == "regenOPMLKey") {
 
                        print "<rpc-reply>";
-                       set_pref($link, "_PREFS_PUBLISH_KEY", 
-                               sha1(uniqid(rand(), true)), $_SESSION["uid"]);
+
+                       update_feed_access_key($link, 'OPML:Publish', 
+                               false, $_SESSION["uid"]);
+
                        $new_link = opml_publish_url($link);            
                        print "<link><![CDATA[$new_link]]></link>";
                        print "</rpc-reply>";