diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-04-01 23:56:13 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-04-01 23:56:13 -0400 |
commit | 5eca42975cdf3fc0e5be2dfdb05ded9d19ed5b7c (patch) | |
tree | 5ce33b1595a2dd7d94e43ca9d2efc7be8facc94b /mod/profile.php | |
parent | 9472ba8d2031183cc9d573f27e02511c1c5a3050 (diff) | |
parent | 5d35f0d54a52801dd9a17d4e44c294e4c9168de3 (diff) | |
download | volse-hubzilla-5eca42975cdf3fc0e5be2dfdb05ded9d19ed5b7c.tar.gz volse-hubzilla-5eca42975cdf3fc0e5be2dfdb05ded9d19ed5b7c.tar.bz2 volse-hubzilla-5eca42975cdf3fc0e5be2dfdb05ded9d19ed5b7c.zip |
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
add title to D* posts
allow users to set categories on their posts
Modified peopleyouknow to handle sites without Facebook better
diabook-themes: add link to global dir in "find friends" at right_aside
modified: mod/newmember.php
New user quick start.
check for style.php existence before inclusion
Moved Diaspora notes away from top, per user request
* master:
Diffstat (limited to 'mod/profile.php')
-rwxr-xr-x | mod/profile.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/mod/profile.php b/mod/profile.php index 782d17d83..26b33d5f1 100755 --- a/mod/profile.php +++ b/mod/profile.php @@ -2,6 +2,11 @@ function profile_init(&$a) { + require_once('include/contact_widgets.php'); + + if(! x($a->page,'aside')) + $a->page['aside'] = ''; + $blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false); if($a->argc > 1) @@ -59,6 +64,13 @@ function profile_init(&$a) { function profile_content(&$a, $update = 0) { + if (x($a->category)) { + $category = $a->category; + } + else { + $category = ((x($_GET,'category')) ? $_GET['category'] : ''); + } + if(get_config('system','block_public') && (! local_user()) && (! remote_user())) { return login(); } @@ -112,7 +124,8 @@ function profile_content(&$a, $update = 0) { return; } - + $a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); + if(! $update) { if(x($_GET,'tab')) $tab = notags(trim($_GET['tab'])); @@ -135,6 +148,7 @@ function profile_content(&$a, $update = 0) { $celeb = ((($a->profile['page-flags'] == PAGE_SOAPBOX) || ($a->profile['page-flags'] == PAGE_COMMUNITY)) ? true : false); + if(can_write_wall($a,$a->profile['profile_uid'])) { $x = array( @@ -178,6 +192,10 @@ function profile_content(&$a, $update = 0) { } else { + if(x($category)) { + $sql_extra .= file_tag_file_query('item',$category,'category'); + } + $r = q("SELECT COUNT(*) AS `total` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 @@ -204,6 +222,7 @@ function profile_content(&$a, $update = 0) { intval($a->profile['profile_uid']) ); + } $parents_arr = array(); |