diff options
-rw-r--r-- | include/conversation.php | 4 | ||||
-rwxr-xr-x | mod/cal.php | 3 | ||||
-rwxr-xr-x | view/tpl/events_cal-js.tpl | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/include/conversation.php b/include/conversation.php index e2dfccac9..39119b2bb 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1599,7 +1599,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){ $uid = (($a->profile['profile_uid']) ? $a->profile['profile_uid'] : local_channel()); if($uid == local_channel()) { - $cal_link = '/events'; + $cal_link = ''; } else { $cal_link = '/cal/' . $nickname; @@ -1653,7 +1653,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){ ); } - if($p['view_stream']) { + if($p['view_stream'] && $cal_link) { $tabs[] = array( 'label' => t('Events'), 'url' => $a->get_baseurl() . $cal_link, diff --git a/mod/cal.php b/mod/cal.php index 1e2405cd0..453f46f69 100755 --- a/mod/cal.php +++ b/mod/cal.php @@ -80,6 +80,8 @@ function cal_content(&$a) { $o = ''; + $tabs = profile_tabs($a, True, $channel['channel_address']); + $mode = 'view'; $y = 0; $m = 0; @@ -333,6 +335,7 @@ function cal_content(&$a) { '$today' => t('Today'), '$form' => $form, '$expandform' => ((x($_GET,'expandform')) ? true : false), + '$tabs' => $tabs )); if (x($_GET,'id')){ echo $o; killme(); } diff --git a/view/tpl/events_cal-js.tpl b/view/tpl/events_cal-js.tpl index b3c7ff03b..bc8a3aa31 100755 --- a/view/tpl/events_cal-js.tpl +++ b/view/tpl/events_cal-js.tpl @@ -1,3 +1,4 @@ +{{$tabs}} <div class="generic-content-wrapper"> <div class="section-title-wrapper"> <div class="pull-right"> |