mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-30 18:24:29 +01:00
additional measurements for catalog, so it does not throw errors; should fix vichan-devel#84
This commit is contained in:
parent
92183e8e39
commit
a25e5f7839
@ -49,9 +49,10 @@
|
|||||||
$post['youtube'] = $matches[2];
|
$post['youtube'] = $matches[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($post['files'])) {
|
if (isset($post['files']) && $post['files']) {
|
||||||
$files = json_decode($post['files']);
|
$files = json_decode($post['files']);
|
||||||
|
|
||||||
|
if ($files[0]) {
|
||||||
if ($files[0]->file == 'deleted') {
|
if ($files[0]->file == 'deleted') {
|
||||||
if (count($files) > 1) {
|
if (count($files) > 1) {
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
@ -72,6 +73,7 @@
|
|||||||
$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;
|
if (empty($post['image_count'])) $post['image_count'] = 0;
|
||||||
$recent_posts[] = $post;
|
$recent_posts[] = $post;
|
||||||
|
Loading…
Reference in New Issue
Block a user