From: Stephan Bergemann Date: Thu, 14 Jun 2012 17:38:43 +0000 (+0200) Subject: fixed handling of fallback_images X-Git-Tag: v4.5.0beta1~74^2~420^2~7^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4eb0c270aa902bd5d84edb2500f866fed4e6e9ab;p=nextcloud-server.git fixed handling of fallback_images --- diff --git a/apps/gallery/templates/index.php b/apps/gallery/templates/index.php index 544875a9ef3..bf4f117c7de 100644 --- a/apps/gallery/templates/index.php +++ b/apps/gallery/templates/index.php @@ -109,8 +109,11 @@ for($i = 0; $i < count($images); $i++) { } if (count($dir_arr) == 2) { // These are the pics in our current subdir $second_level_images[] = $root.$images[$i]; + $fallback_images = array(); } else { // These are images from the deeper directories - $fallback_images[] = $root.$images[$i]; + if(count($second_level_images) == 0) { + $fallback_images[] = $root.$images[$i]; + } } // have us a little something to compare against $previous_element = $images[$i];