Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: profile wall privacy don't expire filed items * master:
This commit is contained in:
commit
cc33a564e1
3 changed files with 18 additions and 12 deletions
|
@ -2936,6 +2936,11 @@ function item_expire($uid,$days) {
|
||||||
|
|
||||||
foreach($r as $item) {
|
foreach($r as $item) {
|
||||||
|
|
||||||
|
// don't expire filed items
|
||||||
|
|
||||||
|
if(strpos($item['file'],'[') !== false)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Only expire posts, not photos and photo comments
|
// Only expire posts, not photos and photo comments
|
||||||
|
|
||||||
if($expire_photos==0 && strlen($item['resource-id']))
|
if($expire_photos==0 && strlen($item['resource-id']))
|
||||||
|
|
|
@ -38,6 +38,7 @@ 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 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>';
|
||||||
|
|
||||||
|
if(! intval($a->data['user']['hidewall'])) {
|
||||||
$o .= '<div id="side-bar-photos-albums" class="widget">';
|
$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 .= '<h3>' . '<a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h3>';
|
||||||
|
|
||||||
|
@ -52,7 +53,7 @@ function photos_init(&$a) {
|
||||||
$o .= '<li>' . '<a href="photos/' . $a->argv[1] . '/album/' . bin2hex($album['album']) . '" >' . $album['album'] . '</a></li>';
|
$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()) {
|
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>';
|
$o .= '<div id="photo-albums-upload-link"><a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/upload" >' .t('Upload New Photos') . '</a></div>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ function profile_content(&$a, $update = 0) {
|
||||||
|
|
||||||
$is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false);
|
$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);
|
notice( t('Access to this profile has been restricted.') . EOL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue