diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/users.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index 36e137876..2d6b7cabd 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1222,12 +1222,14 @@ function elgg_user_hover_menu($hook, $type, $return, $params) { if ($user->isFriend()) { $url = "action/friends/remove?friend={$user->guid}"; $text = elgg_echo('friend:remove'); + $name = 'remove_friend'; } else { $url = "action/friends/add?friend={$user->guid}"; $text = elgg_echo('friend:add'); + $name = 'add_friend'; } $url = elgg_add_action_tokens_to_url($url); - $item = new ElggMenuItem('addfriend', $text, $url); + $item = new ElggMenuItem($name, $text, $url); $item->setSection('action'); $return[] = $item; } else { |