From de09883d860d6507a2d287d0b8bae394963c4b94 Mon Sep 17 00:00:00 2001 From: Bartek Przybylski Date: Sat, 17 Mar 2012 23:41:10 +0100 Subject: creating and retrive thumbnails for intermediate galleries --- apps/gallery/ajax/galleryOp.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/gallery/ajax') 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)); } -- cgit v1.2.3