diff options
author | friendica <info@friendica.com> | 2014-01-21 23:09:33 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-01-21 23:09:33 -0800 |
commit | 3b375a3d3f6d0d7fef885edcc75097564a1f7987 (patch) | |
tree | 99eab27f80a4c6d950ec6ed48c039ba574939559 /include | |
parent | a13393fb230f83cbb93ad36494ce337ef5c48ee0 (diff) | |
download | volse-hubzilla-3b375a3d3f6d0d7fef885edcc75097564a1f7987.tar.gz volse-hubzilla-3b375a3d3f6d0d7fef885edcc75097564a1f7987.tar.bz2 volse-hubzilla-3b375a3d3f6d0d7fef885edcc75097564a1f7987.zip |
fix location of string file in Translations.md, fix some permissions and owner vagueness (potential bugs) in profile_tabs()
Diffstat (limited to 'include')
-rw-r--r-- | include/conversation.php | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/include/conversation.php b/include/conversation.php index a9bf69a3e..708348ddd 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1431,7 +1431,8 @@ function network_tabs() { function profile_tabs($a, $is_owner=False, $nickname=Null){ //echo "<pre>"; var_dump($a->user); killme(); - + + $channel = $a->get_channel(); if (is_null($nickname)) @@ -1451,33 +1452,38 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){ 'title' => t('Status Messages and Posts'), 'id' => 'status-tab', ), - array( + ); + + $p = get_all_perms($a->profile['profile_uid'],get_observer_hash()); + + if($p['view_profile']) { + $tabs[] = array( 'label' => t('About'), 'url' => $pr, 'sel' => ((argv(0) == 'profile') ? 'active' : ''), 'title' => t('Profile Details'), 'id' => 'profile-tab', - ), - array( + ); + } + if($p['view_photos']) { + $tabs[] = array( 'label' => t('Photos'), 'url' => $a->get_baseurl() . '/photos/' . $nickname, 'sel' => ((argv(0) == 'photos') ? 'active' : ''), 'title' => t('Photo Albums'), 'id' => 'photo-tab', - ), - - array( + ); + } + if($p['view_storage']) { + $tabs[] = array( 'label' => t('Files'), 'url' => $a->get_baseurl() . '/cloud/' . $nickname, 'sel' => ((argv(0) == 'cloud') ? 'active' : ''), 'title' => t('Files and Storage'), 'id' => 'files-tab', - ), - - ); - - - if ($is_owner){ + ); + } + if($is_owner) { $tabs[] = array( 'label' => t('Events'), 'url' => $a->get_baseurl() . '/events', @@ -1485,15 +1491,18 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){ 'title' => t('Events and Calendar'), 'id' => 'events-tab', ); - if(feature_enabled(local_user(),'webpages')){ + } + + if($is_owner && feature_enabled($a->profile['profile_uid'],'webpages')) { $tabs[] = array( 'label' => t('Webpages'), 'url' => $a->get_baseurl() . '/webpages/' . $nickname, 'sel' => ((argv(0) == 'webpages') ? 'active' : ''), 'title' => t('Manage Webpages'), 'id' => 'webpages-tab', - );} + ); } + else { // FIXME // we probably need a listing of events that were created by |