aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/pages/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/bookmarks/pages/edit.php')
-rw-r--r--mod/bookmarks/pages/edit.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/mod/bookmarks/pages/edit.php b/mod/bookmarks/pages/edit.php
new file mode 100644
index 000000000..1c74a592a
--- /dev/null
+++ b/mod/bookmarks/pages/edit.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Add bookmark page
+ *
+ * @package ElggBookmarks
+ */
+
+gatekeeper();
+$bookmark_guid = get_input('guid');
+$bookmark = get_entity($bookmark_guid);
+$container_guid = (int) get_input('container_guid');
+$container = get_entity($container_guid);
+
+if (!elgg_instanceof($bookmark, 'object', 'bookmarks')) {
+ register_error(elgg_echo('bookmarks:unknown_bookmark'));
+ forward(REFERRER);
+}
+
+// for groups.
+$container = $bookmark->getContainerEntity();
+elgg_set_page_owner_guid($container->getGUID());
+
+$title = elgg_echo('bookmarks:edit');
+elgg_push_breadcrumb($title);
+
+$vars = bookmarks_prepare_form_vars($bookmark);
+$content = elgg_view_form('bookmarks/save', array(), $vars);
+
+$body = elgg_view_layout('content', array(
+ 'filter' => '',
+ 'buttons' => '',
+ 'content' => $content,
+ 'title' => $title,
+));
+
+echo elgg_view_page($title, $body); \ No newline at end of file