]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixed second_level_images issue
authorStephan Bergemann <st.bergemann@htw-berlin.de>
Tue, 12 Jun 2012 11:05:25 +0000 (13:05 +0200)
committerStephan Bergemann <st.bergemann@htw-berlin.de>
Wed, 13 Jun 2012 23:27:26 +0000 (01:27 +0200)
apps/gallery/templates/index.php

index 930f80238be0ecd86385a0859cdb07466a77e120..5a9aba9ea07ae835ae492c9a8317001658c7088c 100644 (file)
@@ -109,12 +109,11 @@ for($i = 0; $i < count($images); $i++) {
        if(count($dir_arr) == 1) { // getting the images in this directory
                $root_images[] = $root.$images[$i];
        } else {
-               if (count($dir_arr) == 2) { // These are the pics in that subdir
-                       $second_level_images[] = $root.$images[$i];
-               }
                if(strcmp($prev_dir_arr[0], $dir_arr[0]) != 0) {
                        $tl->addTile(new \OC\Pictures\TileStack($second_level_images, $prev_dir_arr[0]));
                        $second_level_images = array();
+               } else if (count($dir_arr) == 2) { // These are the pics in that subdir
+                       $second_level_images[] = $root.$images[$i];
                }
                // have us a little something to compare against
                $previous_element = $images[$i];