diff options
| author | copypaste <admin@8chan.co> | 2014-04-27 15:48:47 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-04-27 15:48:47 +0200 |
| commit | c483e1258cb5d168812a6e509e982a172f6c36c6 (patch) | |
| tree | be6324a26d75b43b2f4e1f017661b50b89aa8d2b /templates/themes/ukko/theme.php | |
| parent | 7a04150b04d953f457c3fddf4bc198597f7e6470 (diff) | |
multiimage posting
Diffstat (limited to 'templates/themes/ukko/theme.php')
| -rw-r--r-- | templates/themes/ukko/theme.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/themes/ukko/theme.php b/templates/themes/ukko/theme.php index 1ca00014..88b0c4a4 100644 --- a/templates/themes/ukko/theme.php +++ b/templates/themes/ukko/theme.php @@ -51,14 +51,14 @@ $num_images = 0; while ($po = $posts->fetch()) { - if ($po['file']) + if ($po['files']) $num_images++; $thread->add(new Post($po, $mod ? '?/' : $config['root'], $mod)); } if ($posts->rowCount() == ($post['sticky'] ? $config['threads_preview_sticky'] : $config['threads_preview'])) { - $ct = prepare(sprintf("SELECT COUNT(`id`) as `num` FROM ``posts_%s`` WHERE `thread` = :thread UNION ALL SELECT COUNT(`id`) FROM ``posts_%s`` WHERE `file` IS NOT NULL AND `thread` = :thread", $post['board'], $post['board'])); + $ct = prepare(sprintf("SELECT COUNT(`id`) as `num` FROM ``posts_%s`` WHERE `thread` = :thread UNION ALL SELECT COUNT(`id`) FROM ``posts_%s`` WHERE `files` IS NOT NULL AND `thread` = :thread", $post['board'], $post['board'])); $ct->bindValue(':thread', $post['id'], PDO::PARAM_INT); $ct->execute() or error(db_error($count)); |
