aboutsummaryrefslogtreecommitdiff
path: root/actions/simplepie/save_group_feed.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/simplepie/save_group_feed.php')
-rw-r--r--actions/simplepie/save_group_feed.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/actions/simplepie/save_group_feed.php b/actions/simplepie/save_group_feed.php
new file mode 100644
index 000000000..830861612
--- /dev/null
+++ b/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;