]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
Fix permissions when viewing photos, applying same fix to items as well
[friendica.git] / mod / photos.php
index 06abade5e95d16571a95578d3cccccba491936b4..88e237ab0946924254a8bc9877b2089e7f8f2519 100644 (file)
@@ -88,7 +88,7 @@ function photos_init(App $a) {
                        $ret['albums'] = [];
                        foreach ($albums as $k => $album) {
                                //hide profile photos to others
-                               if (!$is_owner && !remote_user() && ($album['album'] == L10n::t('Profile Photos')))
+                               if (!$is_owner && !remote_user($a->profile_uid) && ($album['album'] == L10n::t('Profile Photos')))
                                        continue;
                                $entry = [
                                        'text'      => $album['album'],
@@ -1573,7 +1573,7 @@ function photos_content(App $a)
                $twist = false;
                foreach ($r as $rr) {
                        //hide profile photos to others
-                       if (!$is_owner && !remote_user() && ($rr['album'] == L10n::t('Profile Photos'))) {
+                       if (!$is_owner && !remote_user($owner_uid) && ($rr['album'] == L10n::t('Profile Photos'))) {
                                continue;
                        }