diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-07-20 10:01:12 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-07-20 10:01:12 +0200 |
commit | 020deefba613327a1d8875ba7f2cf9a750be42dd (patch) | |
tree | f5989c7f45b512c81cc4bec025e7c7137419d516 /mod/contacts.php | |
parent | 1c9ed08620578bebc8af16e003a2ecef2b8a1f37 (diff) | |
parent | b27d68633be6219c3f65d830178e3dc96c1c91e9 (diff) | |
download | volse-hubzilla-020deefba613327a1d8875ba7f2cf9a750be42dd.tar.gz volse-hubzilla-020deefba613327a1d8875ba7f2cf9a750be42dd.tar.bz2 volse-hubzilla-020deefba613327a1d8875ba7f2cf9a750be42dd.zip |
Merge remote-tracking branch 'friendika/master' into newacl
Diffstat (limited to 'mod/contacts.php')
-rw-r--r-- | mod/contacts.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index 7a97b53d2..2fc01a0d8 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -3,13 +3,26 @@ require_once('include/Contact.php'); function contacts_init(&$a) { + if(! local_user()) + return; + require_once('include/group.php'); if(! x($a->page,'aside')) $a->page['aside'] = ''; $a->page['aside'] .= group_side(); - if($a->config['register_policy'] != REGISTER_CLOSED) - $a->page['aside'] .= '<div class="side-link" id="side-invite-link" ><a href="invite" >' . t("Invite Friends") . '</a></div>'; + $inv = '<div class="side-link" id="side-invite-link" ><a href="invite" >' . t("Invite Friends") . '</a></div>'; + + if(get_config('system','invitation_only')) { + $x = get_pconfig(local_user(),'system','invites_remaining'); + if($x || is_site_admin()) { + $a->page['aside'] .= '<div class="side-link" id="side-invite-remain">' + . sprintf( tt('%d invitation available','%d invitations available',$x), $x) + . '</div>' . $inv; + } + } + elseif($a->config['register_policy'] != REGISTER_CLOSED) + $a->page['aside'] .= $inv; $a->page['aside'] .= '<div class="side-link" id="side-match-link"><a href="match" >' |