diff options
Diffstat (limited to 'mod/photos.php')
-rw-r--r-- | mod/photos.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mod/photos.php b/mod/photos.php index a3ca933b1..c43beb8d4 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -539,8 +539,8 @@ function photos_content(&$a) { $albumselect = '<select id="photos-upload-album-select" name="album" size="4">'; $albumselect .= '<option value="" ' . ((! $selname) ? ' selected="selected" ' : '') . '> </option>'; - if(count($albums)) { - foreach($albums as $album) { + if(count($albums['albums'])) { + foreach($albums['albums'] as $album) { if(! $album['text']) continue; $selected = (($selname === $album['text']) ? ' selected="selected" ' : ''); @@ -548,8 +548,6 @@ function photos_content(&$a) { } } - $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); - $albumselect .= '</select>'; $uploader = ''; @@ -929,6 +927,10 @@ function photos_content(&$a) { $edit = null; if($can_post) { + if(array_key_exists('albums', $a->data)) + $albums = get_app()->data['albums']; + else + $albums = photos_albums_list($a->data['channel'],$a->data['observer']); $album_e = $ph[0]['album']; $caption_e = $ph[0]['description']; @@ -939,6 +941,7 @@ function photos_content(&$a) { 'id' => $ph[0]['id'], 'rotatecw' => t('Rotate CW (right)'), 'rotateccw' => t('Rotate CCW (left)'), + 'albums' => $albums['albums'], 'album' => $album_e, 'newalbum' => t('New album name'), 'nickname' => $a->data['channel']['channel_address'], |