diff options
author | Sem <sembrestels@riseup.net> | 2011-12-09 02:43:48 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2011-12-09 02:43:48 +0100 |
commit | 33f82b5ada858508d97d81a5e2c686b3ba7d0d9c (patch) | |
tree | 5345815276d60eeb72feb1b602c905182db18099 /start.php | |
parent | 862cec3dec4bdb4983a22db7d79d2aae4f1031fd (diff) | |
download | elgg-33f82b5ada858508d97d81a5e2c686b3ba7d0d9c.tar.gz elgg-33f82b5ada858508d97d81a5e2c686b3ba7d0d9c.tar.bz2 |
Added a num of friend requests on menu text and fixed a bug in decline message.
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'), ); |