aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-10-10 07:41:23 -0700
committerfabrixxm <fabrix.xm@gmail.com>2011-10-10 07:41:23 -0700
commit2ea2e7f4b4a1f890cfcba95e92bf81a273042196 (patch)
treeaa5b591796073a319ddd1d61e142fc95a87f6533
parented07a4def34a44be323a9b0d61e2d9eb0701ec4a (diff)
parent070e081ae9be8d43b92425cc9a9131d5977f8e00 (diff)
downloadvolse-hubzilla-2ea2e7f4b4a1f890cfcba95e92bf81a273042196.tar.gz
volse-hubzilla-2ea2e7f4b4a1f890cfcba95e92bf81a273042196.tar.bz2
volse-hubzilla-2ea2e7f4b4a1f890cfcba95e92bf81a273042196.zip
Merge pull request #27 from fabrixxm/master
Fix url in profile tabs
-rw-r--r--boot.php8
-rw-r--r--mod/photos.php2
-rw-r--r--mod/profile.php2
3 files changed, 7 insertions, 5 deletions
diff --git a/boot.php b/boot.php
index d4e9ed0d6..e9c3f0e31 100644
--- 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':''),
),
);
diff --git a/mod/photos.php b/mod/photos.php
index 623b15a93..284169221 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -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
diff --git a/mod/profile.php b/mod/profile.php
index 9da0784d3..a453f72f1 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -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') {