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