diff options
author | marijus <mario@mariovavti.com> | 2014-10-29 14:29:38 +0100 |
---|---|---|
committer | marijus <mario@mariovavti.com> | 2014-10-29 14:29:38 +0100 |
commit | fc704d1f2f274dd8a4c2906b9c017187c34a4060 (patch) | |
tree | 02860affec0b1497fbeae4605e3c1905875b9b9f /include/conversation.php | |
parent | 7d9f785758ee6e4c19838e532f9930e227e95fc6 (diff) | |
download | volse-hubzilla-fc704d1f2f274dd8a4c2906b9c017187c34a4060.tar.gz volse-hubzilla-fc704d1f2f274dd8a4c2906b9c017187c34a4060.tar.bz2 volse-hubzilla-fc704d1f2f274dd8a4c2906b9c017187c34a4060.zip |
if someone does not have permission to chat do not show the chatrooms tab
Diffstat (limited to 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/include/conversation.php b/include/conversation.php index 48fe8af60..a531de9ba 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1551,16 +1551,18 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){ ); } - require_once('include/chat.php'); - $has_chats = chatroom_list_count($uid); - if ($has_chats) { - $tabs[] = array( - 'label' => t('Chatrooms'), - 'url' => $a->get_baseurl() . '/chat/' . $nickname, - 'sel' => ((argv(0) == 'chat') ? 'active' : '' ), - 'title' => t('Chatrooms'), - 'id' => 'chat-tab', - ); + if($p['chat']) { + require_once('include/chat.php'); + $has_chats = chatroom_list_count($uid); + if ($has_chats) { + $tabs[] = array( + 'label' => t('Chatrooms'), + 'url' => $a->get_baseurl() . '/chat/' . $nickname, + 'sel' => ((argv(0) == 'chat') ? 'active' : '' ), + 'title' => t('Chatrooms'), + 'id' => 'chat-tab', + ); + } } require_once('include/menu.php'); |