]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixed handling of fallback_images
authorStephan Bergemann <st.bergemann@htw-berlin.de>
Thu, 14 Jun 2012 17:38:43 +0000 (19:38 +0200)
committerStephan Bergemann <st.bergemann@htw-berlin.de>
Thu, 14 Jun 2012 17:38:43 +0000 (19:38 +0200)
apps/gallery/templates/index.php

index 544875a9ef35e626b5ffc45f1d702d4847b45b39..bf4f117c7deae26b99b8e53e3967f3b31c0486cd 100644 (file)
@@ -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];