aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/pages/edit.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-16 22:00:32 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-16 22:00:32 +0000
commite45c0d4a62e6bc0f5aa2cd0522987123a9b457c7 (patch)
tree06644a4bd5a764c8dda28cec6125ac5ead486e11 /mod/bookmarks/pages/edit.php
parent851b6f87d426ff60d21eeafd6d63ff241bb18b82 (diff)
downloadelgg-e45c0d4a62e6bc0f5aa2cd0522987123a9b457c7.tar.gz
elgg-e45c0d4a62e6bc0f5aa2cd0522987123a9b457c7.tar.bz2
Refs #2680. Bookmarks revamp, part 2.
git-svn-id: http://code.elgg.org/elgg/trunk@8264 36083f99-b078-4883-b0ff-0f9b5a30f544
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