Only Process Images if > 0
This commit is contained in:
parent
edcffd343e
commit
c109033996
1 changed files with 8 additions and 6 deletions
14
index.php
14
index.php
|
@ -84,13 +84,15 @@ if (count($curfiles) > 0 | count($dirs) > 0) {
|
|||
|
||||
// Prepare Mode Specific Data and Render Template
|
||||
if ($slice > 1) {
|
||||
foreach ($curfiles as $index => $image) {
|
||||
$tmp['n'] = $image;
|
||||
$tmp['i'] = $index+1;
|
||||
$tmp['t'] = $thumburl.$t->get_thumb($image);
|
||||
$data['images'][] = $tmp;
|
||||
$data['dirs'] = $dirs;
|
||||
if (count($curfiles) > 0) {
|
||||
foreach ($curfiles as $index => $image) {
|
||||
$tmp['n'] = $image;
|
||||
$tmp['i'] = $index+1;
|
||||
$tmp['t'] = $thumburl.$t->get_thumb($image);
|
||||
$data['images'][] = $tmp;
|
||||
}
|
||||
}
|
||||
$data['dirs'] = $dirs;
|
||||
Template::view('tpl/gallery.html', $data);
|
||||
} else {
|
||||
$data['gallery_page'] = ceil($page/$gslice);
|
||||
|
|
Loading…
Reference in a new issue