From dc09c23db9cadd20d24e04915c9e1565e2de489d Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 1 Apr 2011 00:47:23 +0000 Subject: Fixes #3044 removed bookmark link from user hover menu git-svn-id: http://code.elgg.org/elgg/trunk@8887 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/bookmarks/start.php | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php index b4a4ef46b..394c6c561 100644 --- a/mod/bookmarks/start.php +++ b/mod/bookmarks/start.php @@ -11,7 +11,6 @@ elgg_register_event_handler('init', 'system', 'bookmarks_init'); * Bookmark init */ function bookmarks_init() { - global $CONFIG; $root = dirname(__FILE__); elgg_register_library('elgg:bookmarks', "$root/lib/bookmarks.php"); @@ -31,7 +30,6 @@ function bookmarks_init() { elgg_register_plugin_hook_handler('register', 'menu:page', 'bookmarks_page_menu'); elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'bookmarks_owner_block_menu'); - elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'bookmarks_user_hover_menu'); elgg_register_page_handler('bookmarks', 'bookmarks_page_handler'); @@ -209,6 +207,11 @@ function bookmark_url($entity) { /** * Add a menu item to an ownerblock + * + * @param string $hook + * @param string $type + * @param array $return + * @param array $params */ function bookmarks_owner_block_menu($hook, $type, $return, $params) { if (elgg_instanceof($params['entity'], 'user')) { @@ -227,12 +230,12 @@ function bookmarks_owner_block_menu($hook, $type, $return, $params) { } /** - * Returns a more meaningful message + * Returns the body of a notification message * - * @param unknown_type $hook - * @param unknown_type $entity_type - * @param unknown_type $returnvalue - * @param unknown_type $params + * @param string $hook + * @param string $entity_type + * @param string $returnvalue + * @param array $params */ function bookmarks_notify_message($hook, $entity_type, $returnvalue, $params) { $entity = $params['entity']; @@ -260,31 +263,13 @@ function bookmarks_notify_message($hook, $entity_type, $returnvalue, $params) { return null; } -/** - * Add a user hover menu. - * - * @param unknown_type $hook - * @param unknown_type $type - * @param unknown_type $return - * @param unknown_type $params - */ -function bookmarks_user_hover_menu($hook, $type, $return, $params) { - $user = $params['entity']; - - $title = elgg_echo('bookmarks'); - $url = "bookmarks/owner/$user->username"; - $return[] = new ElggMenuItem('bookmarks', $title, $url); - - return $return; -} - /** * Add a page menu menu. * - * @param unknown_type $hook - * @param unknown_type $type - * @param unknown_type $return - * @param unknown_type $params + * @param string $hook + * @param string $type + * @param array $return + * @param array $params */ function bookmarks_page_menu($hook, $type, $return, $params) { if (elgg_is_logged_in()) { @@ -306,4 +291,4 @@ function bookmarks_page_menu($hook, $type, $return, $params) { } return $return; -} \ No newline at end of file +} -- cgit v1.2.3