Display placeholder if no file in catalog/theme.php

This commit is contained in:
8chan 2014-12-31 22:37:19 -08:00
parent a095b2467a
commit 2be8988284

View File

@ -21,6 +21,7 @@
foreach ($boards as $board) { foreach ($boards as $board) {
$b = new Catalog(); $b = new Catalog();
$b->build($settings, $board); $b->build($settings, $board);
if (php_sapi_name() === "cli") echo "Rebuilding $board catalog...\n";
} }
} elseif ($action == 'post-thread' || ($settings['update_on_posts'] && $action == 'post') || ($settings['update_on_posts'] && $action == 'post-delete') && (in_array($board, $boards) | $settings['all'])) { } elseif ($action == 'post-thread' || ($settings['update_on_posts'] && $action == 'post') || ($settings['update_on_posts'] && $action == 'post-delete') && (in_array($board, $boards) | $settings['all'])) {
$b = new Catalog(); $b = new Catalog();
@ -77,6 +78,8 @@
$post['file'] = $config['uri_thumb'] . $files[0]->thumb; $post['file'] = $config['uri_thumb'] . $files[0]->thumb;
} }
} }
} else {
$post['file'] = $config['root'] . $config['no_file_image'];
} }
if (empty($post['image_count'])) $post['image_count'] = 0; if (empty($post['image_count'])) $post['image_count'] = 0;