diff options
Diffstat (limited to 'include/photos.php')
-rw-r--r-- | include/photos.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/photos.php b/include/photos.php index 5c03b2cdb..82af4aaeb 100644 --- a/include/photos.php +++ b/include/photos.php @@ -77,6 +77,7 @@ function photo_upload($channel, $observer, $args) { $filesize = intval($_FILES['userfile']['size']); $type = $_FILES['userfile']['type']; } + if (! $type) $type=guess_image_type($filename); @@ -268,7 +269,11 @@ function photos_albums_list($channel,$observer) { if($albums) { $ret['success'] = true; foreach($albums as $k => $album) { - $entry = array('text' => $album['album'], 'urlencode' => urlencode($album['album']),'bin2hex' => bin2hex($album['album'])); + $entry = array( + 'text' => $album['album'], + 'url' => z_root() . '/photos/' . $channel['channel_address'] . '/album/' . bin2hex($album['album']), + 'urlencode' => urlencode($album['album']), + 'bin2hex' => bin2hex($album['album'])); $ret[] = $entry; } } |