diff --git a/themes/danbooru/index.theme.php b/themes/danbooru/index.theme.php index 1e97674b..15e0bbf2 100644 --- a/themes/danbooru/index.theme.php +++ b/themes/danbooru/index.theme.php @@ -49,22 +49,10 @@ class CustomIndexTheme extends IndexTheme { } protected function build_table($images, $query) { - global $config; - - $width = $config->get_int('index_width'); - $height = $config->get_int('index_height'); - - $table = "
\n"; - for($i=0; $i<$height; $i++) { - for($j=0; $j<$width; $j++) { - $image = isset($images[$i*$width+$j]) ? $images[$i*$width+$j] : null; - if(!is_null($image)) { - $table .= "\t" . build_thumb_html($image, $query) . "\n"; - } - } + $table = ""; + foreach($images as $image) { + $table .= "\t" . build_thumb_html($image, $query) . "\n"; } - $table .= "
"; - return $table; } }