aboutsummaryrefslogtreecommitdiff
path: root/mod/simplepie/actions
diff options
context:
space:
mode:
Diffstat (limited to 'mod/simplepie/actions')
-rw-r--r--mod/simplepie/actions/simplepie/save_group_feed.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/mod/simplepie/actions/simplepie/save_group_feed.php b/mod/simplepie/actions/simplepie/save_group_feed.php
new file mode 100644
index 000000000..8dc2ffd78
--- /dev/null
+++ b/mod/simplepie/actions/simplepie/save_group_feed.php
@@ -0,0 +1,14 @@
+<?php
+
+$group = get_entity((int)get_input('group_guid'));
+$feed_url = get_input('feed_url');
+
+if (!simplepie_is_url($feed_url)) {
+ register_error (elgg_echo("simplepie:invalid_url"));
+ forward(REFERER);
+}
+
+if (!elgg_instanceof($group, 'group') || !$group->canEdit()) {
+ forward(REFERER);
+}
+$group->feed_url = $feed_url;