aboutsummaryrefslogtreecommitdiff
path: root/mod/externalpages/actions/edit.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 23:10:18 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 23:10:18 +0000
commit0b3724c9b87f891b48c41ad61c1caf3486cc0799 (patch)
tree7bd117e0256e1857da935533eb064213bc890a39 /mod/externalpages/actions/edit.php
parent26f9c39ae33bc01b0f8c62b4e27f7ee077d0fadc (diff)
downloadelgg-0b3724c9b87f891b48c41ad61c1caf3486cc0799.tar.gz
elgg-0b3724c9b87f891b48c41ad61c1caf3486cc0799.tar.bz2
updates externalpages to 1.8
git-svn-id: http://code.elgg.org/elgg/trunk@8209 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/externalpages/actions/edit.php')
-rw-r--r--mod/externalpages/actions/edit.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/mod/externalpages/actions/edit.php b/mod/externalpages/actions/edit.php
new file mode 100644
index 000000000..edfffe168
--- /dev/null
+++ b/mod/externalpages/actions/edit.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Elgg external pages: add/edit
+ *
+ */
+
+// Get input data
+$contents = get_input('expagescontent', '', false);
+$type = get_input('content_type');
+$previous_guid = get_input('expage_guid');
+
+// create object to hold the page details
+$expages = new ElggObject();
+$expages->subtype = $type;
+$expages->owner_guid = get_loggedin_userid();
+$expages->access_id = ACCESS_PUBLIC;
+$expages->title = $type;
+$expages->description = $contents;
+if (!$expages->save()) {
+ register_error(elgg_echo("expages:error"));
+ forward(REFERER);
+}
+
+system_message(elgg_echo("expages:posted"));
+forward(REFERER);