diff options
author | friendica <info@friendica.com> | 2014-01-06 02:54:08 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-01-06 02:54:08 -0800 |
commit | 323fc1f9a5d4bc9d0c40c9931993b8dc9e81e2bd (patch) | |
tree | 8e9365b2f33f3c69f650e5109ded01584d78222d /mod/photos.php | |
parent | a3161a8cd696fcdbebc3d232f35aa2a56a14b869 (diff) | |
download | volse-hubzilla-323fc1f9a5d4bc9d0c40c9931993b8dc9e81e2bd.tar.gz volse-hubzilla-323fc1f9a5d4bc9d0c40c9931993b8dc9e81e2bd.tar.bz2 volse-hubzilla-323fc1f9a5d4bc9d0c40c9931993b8dc9e81e2bd.zip |
fix photos/upload album selector
Diffstat (limited to 'mod/photos.php')
-rw-r--r-- | mod/photos.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mod/photos.php b/mod/photos.php index 85d3f50b0..5afde49ef 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -647,12 +647,21 @@ function photos_content(&$a) { return; } + + + if(array_key_exists('albums', $a->data)) + $albums = get_app()->data['albums']; + else + $albums = photos_albums_list($a->data['channel'],$a->data['observer']); + + + $selname = (($datum) ? hex2bin($datum) : ''); $albumselect = '<select id="photos-upload-album-select" name="album" size="4">'; $albumselect .= '<option value="" ' . ((! $selname) ? ' selected="selected" ' : '') . '> </option>'; - if(count($a->data['albums'])) { - foreach($a->data['albums'] as $album) { + if(count($albums)) { + foreach($albums as $album) { if($album['text'] === '') continue; $selected = (($selname === $album['text']) ? ' selected="selected" ' : ''); |