summaryrefslogtreecommitdiff
path: root/modules/backend-rpc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/backend-rpc.php')
-rw-r--r--modules/backend-rpc.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index 1e757ca72..ddf33a0df 100644
--- a/modules/backend-rpc.php
+++ b/modules/backend-rpc.php
@@ -295,6 +295,23 @@
}
+ if ($subop == "regenPubKey") {
+
+ print "<rpc-reply>";
+
+ set_pref($link, "_PREFS_PUBLISH_KEY", generate_publish_key());
+
+ $url_path = 'http://' . $_SERVER["HTTP_HOST"] . \
+ parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
+
+ $new_link = $url_path . "?op=publish&key=" . get_pref($link, "_PREFS_PUBLISH_KEY");
+
+ print "<link><![CDATA[$new_link]]></link>";
+
+ print "</rpc-reply>";
+
+ }
+
if ($subop == "logout") {
logout_user();
print_error_xml(6);