Fixed blank catalog image count when zero image replies and threads with deleted files from being excluded
This commit is contained in:
parent
39cecea579
commit
cff2af99d5
@ -51,10 +51,26 @@
|
|||||||
|
|
||||||
if (isset($post['files'])) {
|
if (isset($post['files'])) {
|
||||||
$files = json_decode($post['files']);
|
$files = json_decode($post['files']);
|
||||||
if ($files[0]->file == 'deleted') continue;
|
|
||||||
|
if ($files[0]->file == 'deleted') {
|
||||||
|
if (count($files) > 1) {
|
||||||
|
foreach ($files as $file) {
|
||||||
|
if (($file == $files[0]) || ($file->file == 'deleted')) continue;
|
||||||
|
$post['file'] = $config['uri_thumb'] . $file->thumb;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($post['file'])) $post['file'] = $config['image_deleted'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$post['file'] = $config['image_deleted'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
$post['file'] = $config['uri_thumb'] . $files[0]->thumb;
|
$post['file'] = $config['uri_thumb'] . $files[0]->thumb;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($post['image_count'])) $post['image_count'] = 0;
|
||||||
$recent_posts[] = $post;
|
$recent_posts[] = $post;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user