diff --git a/index.php b/index.php index 6a5470e..ab9c165 100644 --- a/index.php +++ b/index.php @@ -66,7 +66,7 @@ $files = array_reverse($files); // Get Files for current Page $curfiles = array_slice($files, ($page-1)*$slice ,$slice, true); -if (count($curfiles) > 0 | count($dirs) > 0) { +if (!empty($curfiles)| !empty($dirs)) { // Prepare Generic Data for Template $data['galleryname'] = $galleryname; $data['startpage'] = $_SERVER['PHP_SELF']; @@ -84,7 +84,7 @@ if (count($curfiles) > 0 | count($dirs) > 0) { // Prepare Mode Specific Data and Render Template if ($slice > 1) { - if (count($curfiles) > 0) { + if (!empty($curfiles)) { foreach ($curfiles as $index => $image) { $tmp['n'] = $image; $tmp['i'] = $index+1;