]> git.mxchange.org Git - friendica.git/commitdiff
Fix url in profile tabs
authorFabio Comuni <fabrix.xm@gmail.com>
Mon, 10 Oct 2011 14:40:12 +0000 (16:40 +0200)
committerFabio Comuni <fabrix.xm@gmail.com>
Mon, 10 Oct 2011 14:40:12 +0000 (16:40 +0200)
boot.php
mod/photos.php
mod/profile.php

index d4e9ed0d63a1d473259089f6e0b2505be3771015..e9c3f0e31ef59b516b5dff8b64328e78b617e552 100644 (file)
--- a/boot.php
+++ b/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':''),
                ),
        );
index 623b15a93b1d1fed47a36c5d68419aa45c40caa1..28416922197cd8e907996c62e8a7b4193fc8ca46 100644 (file)
@@ -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
index 9da0784d3744315688b7245c49ba082b30d14a32..a453f72f1f94124c1bcb649fb4d9e9eb81cbcde0 100644 (file)
@@ -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') {