diff options
author | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-03-17 23:41:10 +0100 |
---|---|---|
committer | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-03-17 23:41:10 +0100 |
commit | de09883d860d6507a2d287d0b8bae394963c4b94 (patch) | |
tree | 8ec442159474428d2b1eb9e66d0351c98f3a90dd /apps/gallery/ajax | |
parent | 7ba8dbb92041d01ca70fca105897d3c374502343 (diff) | |
download | nextcloud-server-de09883d860d6507a2d287d0b8bae394963c4b94.tar.gz nextcloud-server-de09883d860d6507a2d287d0b8bae394963c4b94.zip |
creating and retrive thumbnails for intermediate galleries
Diffstat (limited to 'apps/gallery/ajax')
-rw-r--r-- | apps/gallery/ajax/galleryOp.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/gallery/ajax/galleryOp.php b/apps/gallery/ajax/galleryOp.php index 25976fa9e32..459c30f6ac6 100644 --- a/apps/gallery/ajax/galleryOp.php +++ b/apps/gallery/ajax/galleryOp.php @@ -97,6 +97,8 @@ function handleGetGallery($path) { while ($r = $result->fetchRow()) { $album_name = $r['album_name']; $size=OC_Gallery_Album::getAlbumSize($r['album_id']); + // this is a fallback mechanism and seems expensive + if ($size == 0) $size = OC_Gallery_Album::getIntermediateGallerySize($r['album_path']); $a[] = array('name' => utf8_encode($album_name), 'numOfItems' => min($size, 10),'path'=>substr($r['album_path'], $pathLen)); } |