aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/pages/bookmarks/view.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/bookmarks/pages/bookmarks/view.php')
-rw-r--r--mod/bookmarks/pages/bookmarks/view.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/mod/bookmarks/pages/bookmarks/view.php b/mod/bookmarks/pages/bookmarks/view.php
new file mode 100644
index 000000000..70a6a5bfe
--- /dev/null
+++ b/mod/bookmarks/pages/bookmarks/view.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * View a bookmark
+ *
+ * @package ElggBookmarks
+ */
+
+$bookmark = get_entity(get_input('guid'));
+if (!$bookmark) {
+ register_error(elgg_echo('noaccess'));
+ $_SESSION['last_forward_from'] = current_page_url();
+ forward('');
+}
+
+$page_owner = elgg_get_page_owner_entity();
+
+$crumbs_title = $page_owner->name;
+
+if (elgg_instanceof($page_owner, 'group')) {
+ elgg_push_breadcrumb($crumbs_title, "bookmarks/group/$page_owner->guid/all");
+} else {
+ elgg_push_breadcrumb($crumbs_title, "bookmarks/owner/$page_owner->username");
+}
+
+$title = $bookmark->title;
+
+elgg_push_breadcrumb($title);
+
+$content = elgg_view_entity($bookmark, array('full_view' => true));
+$content .= elgg_view_comments($bookmark);
+
+$body = elgg_view_layout('content', array(
+ 'content' => $content,
+ 'title' => $title,
+ 'filter' => '',
+));
+
+echo elgg_view_page($title, $body);