diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-03-27 04:40:42 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-03-27 04:40:42 -0400 |
commit | cc33a564e1658d32bb5bc3ad0abdfbe6871cf945 (patch) | |
tree | fdeb88be9d8545ead92c5d63a9d9af7f6a7ccc23 | |
parent | c3388ad81336d45a40a66b69096f504ffa7e34cb (diff) | |
parent | 7c6c3d36f589d38de5e8b36f2ba1d940c8150e2c (diff) | |
download | volse-hubzilla-cc33a564e1658d32bb5bc3ad0abdfbe6871cf945.tar.gz volse-hubzilla-cc33a564e1658d32bb5bc3ad0abdfbe6871cf945.tar.bz2 volse-hubzilla-cc33a564e1658d32bb5bc3ad0abdfbe6871cf945.zip |
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
profile wall privacy
don't expire filed items
* master:
-rwxr-xr-x | include/items.php | 5 | ||||
-rwxr-xr-x | mod/photos.php | 23 | ||||
-rwxr-xr-x | mod/profile.php | 2 |
3 files changed, 18 insertions, 12 deletions
diff --git a/include/items.php b/include/items.php index 708fd8121..2eecadad1 100755 --- a/include/items.php +++ b/include/items.php @@ -2936,6 +2936,11 @@ function item_expire($uid,$days) { foreach($r as $item) { + // don't expire filed items + + if(strpos($item['file'],'[') !== false) + continue; + // Only expire posts, not photos and photo comments if($expire_photos==0 && strlen($item['resource-id'])) diff --git a/mod/photos.php b/mod/photos.php index b294f0a66..2a808cb41 100755 --- a/mod/photos.php +++ b/mod/photos.php @@ -38,21 +38,22 @@ function photos_init(&$a) { $o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg" alt="' . $a->data['user']['username'] . '" /></div>'; $o .= '</div>'; - $o .= '<div id="side-bar-photos-albums" class="widget">'; - $o .= '<h3>' . '<a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h3>'; + if(! intval($a->data['user']['hidewall'])) { + $o .= '<div id="side-bar-photos-albums" class="widget">'; + $o .= '<h3>' . '<a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h3>'; - $o .= '<ul>'; - foreach($albums as $album) { + $o .= '<ul>'; + foreach($albums as $album) { - // don't show contact photos. We once translated this name, but then you could still access it under - // a different language setting. Now we store the name in English and check in English (and translated for legacy albums). + // don't show contact photos. We once translated this name, but then you could still access it under + // a different language setting. Now we store the name in English and check in English (and translated for legacy albums). - if((! strlen($album['album'])) || ($album['album'] === 'Contact Photos') || ($album['album'] === t('Contact Photos'))) - continue; - $o .= '<li>' . '<a href="photos/' . $a->argv[1] . '/album/' . bin2hex($album['album']) . '" >' . $album['album'] . '</a></li>'; + if((! strlen($album['album'])) || ($album['album'] === 'Contact Photos') || ($album['album'] === t('Contact Photos'))) + continue; + $o .= '<li>' . '<a href="photos/' . $a->argv[1] . '/album/' . bin2hex($album['album']) . '" >' . $album['album'] . '</a></li>'; + } + $o .= '</ul>'; } - $o .= '</ul>'; - if(local_user() && $a->data['user']['uid'] == local_user()) { $o .= '<div id="photo-albums-upload-link"><a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/upload" >' .t('Upload New Photos') . '</a></div>'; } diff --git a/mod/profile.php b/mod/profile.php index 428679ffc..782d17d83 100755 --- a/mod/profile.php +++ b/mod/profile.php @@ -107,7 +107,7 @@ function profile_content(&$a, $update = 0) { $is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false); - if($a->user['hidewall'] && (! $is_owner) && (! $remote_contact)) { + if($a->profile['hidewall'] && (! $is_owner) && (! $remote_contact)) { notice( t('Access to this profile has been restricted.') . EOL); return; } |