diff options
| author | Fredrick Brennan <admin@8chan.co> | 2014-05-04 19:11:43 -0400 |
|---|---|---|
| committer | Fredrick Brennan <admin@8chan.co> | 2014-05-04 19:11:43 -0400 |
| commit | 664daf857122630243214a7db1f969a6f9612243 (patch) | |
| tree | 9aaa9417269cd71e78fe7e27da9f288e28b12de5 /inc/functions.php | |
| parent | ac31698b0dc9b376c0e1f793293e12ecf735eda7 (diff) | |
| parent | dafe0d5896c904a0c09b4e2f2593a7796f2589e1 (diff) | |
Merge branch 'staging' of https://github.com/vichan-devel/vichan into staging
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/inc/functions.php b/inc/functions.php index 041e3733..b8198522 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -204,7 +204,7 @@ function loadConfig() { if (!isset($config['user_flag'])) $config['user_flag'] = false; if (!isset($config['user_flags'])) - $config['user_flags'] = []; + $config['user_flags'] = array(); if ($config['root_file']) { chdir($config['root_file']); @@ -2041,8 +2041,8 @@ function buildThread50($id, $return = false, $mod = false, $thread = null, $anti if (!isset($thread)) { $thread = new Thread($post, $mod ? '?/' : $config['root'], $mod); } else { - if ($post['file']) - $num_images++; + if ($post['files']) + $num_images += $post['num_files']; $thread->add(new Post($post, $mod ? '?/' : $config['root'], $mod)); } @@ -2074,8 +2074,8 @@ function buildThread50($id, $return = false, $mod = false, $thread = null, $anti foreach ($allPosts as $index => $post) { if ($index == count($allPosts)-count($thread->posts)) break; - if ($post->file) - $thread->omitted_images++; + if ($post->files) + $thread->omitted_images += $post->num_files; } } |
