- /// @TODO Old-lost code?
- /*$sql_extra = Security::getPermissionsSQLByUserId($a->data['user']['uid']);
-
- $albums = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d $sql_extra order by created desc",
- intval($a->data['user']['uid'])
- );
-
- if(count($albums)) {
- $a->data['albums'] = $albums;
-
- $albums_visible = ((intval($a->data['user']['hidewall']) && (!local_user()) && (!remote_user())) ? false : true);
-
- if($albums_visible) {
- $o .= '<div id="sidebar-photos-albums" class="widget">';
- $o .= '<h3>' . '<a href="' . System::baseUrl() . '/photos/' . $a->data['user']['nickname'] . '">' . L10n::t('Photo Albums') . '</a></h3>';
-
- $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).
-
- if((!strlen($album['album'])) || ($album['album'] === 'Contact Photos') || ($album['album'] === L10n::t('Contact Photos')))
- continue;
- $o .= '<li>' . '<a href="photos/' . $a->argv[1] . '/album/' . bin2hex($album['album']) . '" >' . $album['album'] . '</a></li>';
- }
- $o .= '</ul>';
- }
- if(local_user() && $a->data['user']['uid'] == local_user()) {
- $o .= '<div id="photo-albums-upload-link"><a href="' . System::baseUrl() . '/photos/' . $a->data['user']['nickname'] . '/upload" >' .L10n::t('Upload New Photos') . '</a></div>';
- }
-
- $o .= '</div>';
- }*/
-