mirror of
https://github.com/friendica/friendica
synced 2024-11-11 01:02:54 +00:00
commit
2ea2e7f4b4
3 changed files with 7 additions and 5 deletions
8
boot.php
8
boot.php
|
@ -1162,14 +1162,16 @@ function load_contact_links($uid) {
|
|||
}}
|
||||
|
||||
if(! function_exists('profile_tabs')){
|
||||
function profile_tabs($a, $is_owner=False){
|
||||
function profile_tabs($a, $is_owner=False, $nickname=Null){
|
||||
//echo "<pre>"; var_dump($a->user); killme();
|
||||
|
||||
if (is_null($nickname))
|
||||
$nickname = $a->user['nickname'];
|
||||
|
||||
if(x($_GET,'tab'))
|
||||
$tab = notags(trim($_GET['tab']));
|
||||
|
||||
$url = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
|
||||
$url = $a->get_baseurl() . '/profile/' . $nickname;
|
||||
|
||||
$tabs = array(
|
||||
array(
|
||||
|
@ -1184,7 +1186,7 @@ function profile_tabs($a, $is_owner=False){
|
|||
),
|
||||
array(
|
||||
'label' => t('Photos'),
|
||||
'url' => $a->get_baseurl() . '/photos/' . $a->user['nickname'],
|
||||
'url' => $a->get_baseurl() . '/photos/' . $nickname,
|
||||
'sel' => ((!isset($tab)&&$a->argv[0]=='photos')?'active':''),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -832,7 +832,7 @@ function photos_content(&$a) {
|
|||
|
||||
// tabs
|
||||
$_is_owner = (local_user() && (local_user() == $owner_uid));
|
||||
$o .= profile_tabs($a,$_is_owner);
|
||||
$o .= profile_tabs($a,$_is_owner, $a->data['user']['nickname']);
|
||||
|
||||
//
|
||||
// dispatch request
|
||||
|
|
|
@ -110,7 +110,7 @@ function profile_content(&$a, $update = 0) {
|
|||
if(x($_GET,'tab'))
|
||||
$tab = notags(trim($_GET['tab']));
|
||||
|
||||
$o.=profile_tabs($a, $is_owner);
|
||||
$o.=profile_tabs($a, $is_owner, $a->profile['nickname']);
|
||||
|
||||
|
||||
if($tab === 'profile') {
|
||||
|
|
Loading…
Reference in a new issue