fix photos/upload album selector
This commit is contained in:
parent
a3161a8cd6
commit
323fc1f9a5
@ -647,12 +647,21 @@ function photos_content(&$a) {
|
|||||||
return;
|
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) : '');
|
$selname = (($datum) ? hex2bin($datum) : '');
|
||||||
$albumselect = '<select id="photos-upload-album-select" name="album" size="4">';
|
$albumselect = '<select id="photos-upload-album-select" name="album" size="4">';
|
||||||
|
|
||||||
$albumselect .= '<option value="" ' . ((! $selname) ? ' selected="selected" ' : '') . '> </option>';
|
$albumselect .= '<option value="" ' . ((! $selname) ? ' selected="selected" ' : '') . '> </option>';
|
||||||
if(count($a->data['albums'])) {
|
if(count($albums)) {
|
||||||
foreach($a->data['albums'] as $album) {
|
foreach($albums as $album) {
|
||||||
if($album['text'] === '')
|
if($album['text'] === '')
|
||||||
continue;
|
continue;
|
||||||
$selected = (($selname === $album['text']) ? ' selected="selected" ' : '');
|
$selected = (($selname === $album['text']) ? ' selected="selected" ' : '');
|
||||||
|
Reference in New Issue
Block a user