Add current tab parameter to Model\Profile::getTabs

This commit is contained in:
Hypolite Petovan 2019-05-20 15:09:33 -04:00
parent 709eba6ce3
commit c65faecc8c
8 changed files with 30 additions and 30 deletions

View file

@ -147,7 +147,7 @@ function cal_content(App $a)
$sql_extra = " AND `event`.`cid` = 0 " . $sql_perms;
// get the tab navigation bar
$tabs = Profile::getTabs($a, false, $a->data['user']['nickname']);
$tabs = Profile::getTabs($a, 'cal', false, $a->data['user']['nickname']);
// The view mode part is similiar to /mod/events.php
if ($mode == 'view') {

View file

@ -246,7 +246,7 @@ function events_content(App $a)
$tabs = '';
// tabs
if ($a->theme_events_in_profile) {
$tabs = Profile::getTabs($a, true);
$tabs = Profile::getTabs($a, 'events', true);
}
$mode = 'view';

View file

@ -28,7 +28,7 @@ function notes_content(App $a, $update = false)
return;
}
$o = Profile::getTabs($a, true);
$o = Profile::getTabs($a, 'notes', true);
if (!$update) {
$o .= '<h3>' . L10n::t('Personal Notes') . '</h3>';

View file

@ -950,7 +950,7 @@ function photos_content(App $a)
// tabs
$is_owner = (local_user() && (local_user() == $owner_uid));
$o .= Profile::getTabs($a, $is_owner, $a->data['user']['nickname']);
$o .= Profile::getTabs($a, 'photos', $is_owner, $a->data['user']['nickname']);
// Display upload form
if ($datatype === 'upload') {

View file

@ -217,7 +217,7 @@ function videos_content(App $a)
// tabs
$_is_owner = (local_user() && (local_user() == $owner_uid));
$o .= Profile::getTabs($a, $_is_owner, $a->data['user']['nickname']);
$o .= Profile::getTabs($a, 'videos', $_is_owner, $a->data['user']['nickname']);
//
// dispatch request