diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2016-02-25 06:05:12 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2016-02-25 06:05:12 +0100 |
commit | 21f2df399d3e21b6322ece16717efe88bcc21621 (patch) | |
tree | 1f6bcf44e803c1ef723b546eb4fcd83dc5f82e87 /include/conversation.php | |
parent | ddeab48f9b314eed067c31086945acee33964d37 (diff) | |
parent | 43521bb10b71752b5b3fd953056966ba30df50b6 (diff) | |
download | volse-hubzilla-21f2df399d3e21b6322ece16717efe88bcc21621.tar.gz volse-hubzilla-21f2df399d3e21b6322ece16717efe88bcc21621.tar.bz2 volse-hubzilla-21f2df399d3e21b6322ece16717efe88bcc21621.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/conversation.php b/include/conversation.php index 1ade8ed3a..e2dfccac9 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1595,8 +1595,17 @@ function profile_tabs($a, $is_owner = false, $nickname = null){ if (is_null($nickname)) $nickname = $channel['channel_address']; + $uid = (($a->profile['profile_uid']) ? $a->profile['profile_uid'] : local_channel()); + if($uid == local_channel()) { + $cal_link = '/events'; + } + else { + $cal_link = '/cal/' . $nickname; + } + + if (get_pconfig($uid, 'system', 'noprofiletabs')) return; @@ -1644,6 +1653,17 @@ function profile_tabs($a, $is_owner = false, $nickname = null){ ); } + if($p['view_stream']) { + $tabs[] = array( + 'label' => t('Events'), + 'url' => $a->get_baseurl() . $cal_link, + 'sel' => ((argv(0) == 'cal' || argv(0) == 'events') ? 'active' : ''), + 'title' => t('Events'), + 'id' => 'event-tab', + ); + } + + if ($p['chat']) { require_once('include/chat.php'); $has_chats = chatroom_list_count($uid); |