diff options
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -13,9 +13,19 @@ function friendrequest_init() { elgg_register_page_handler('friendrequests', 'friendrequest_page_handler'); if (elgg_is_logged_in()) { + + $count = elgg_get_entities_from_relationship(array( + 'type' => 'user', + 'relationship' => 'friendrequest', + 'relationship_guid' => $page_owner->guid, + 'inverse_relationship' => true, + 'limit' => 0, + 'count' => true, + )); + $params = array( 'name' => 'friendrequests', - 'text' => elgg_echo('friendrequest'), + 'text' => elgg_echo('friendrequest').($count? " ($count)": ""), 'href' => "friendrequests", 'contexts' => array('friends'), ); |