diff options
| author | czaks <marcin@6irc.net> | 2013-08-11 17:49:29 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-08-11 17:49:29 -0400 |
| commit | 8534e2cc80bedcaf4645c9b062906c0d3aedf517 (patch) | |
| tree | 6091ee8c012302b80109ddf32014c66b58cb1bdc /inc/display.php | |
| parent | 500468336e528887db852ae153da89300aefd090 (diff) | |
| parent | a4e97c32ec9d413ea2c77fab61a46c5e6c2cb2d7 (diff) | |
Merge branch 'noko50-new-dev11' of http://github.com/fallenPineapple/Tinyboard
Conflicts:
inc/functions.php
Diffstat (limited to 'inc/display.php')
| -rw-r--r-- | inc/display.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/inc/display.php b/inc/display.php index 0fdf1fff..68fb1803 100644 --- a/inc/display.php +++ b/inc/display.php @@ -426,6 +426,9 @@ class Thread { public function add(Post $post) { $this->posts[] = $post; } + public function postCount() { + return count($this->posts) + $this->omitted; + } public function postControls() { global $board, $config; @@ -497,10 +500,12 @@ class Thread { return fraction($this->filex, $this->filey, ':'); } - public function build($index=false) { + public function build($index=false, $isnoko50=false) { global $board, $config, $debug; - $built = Element('post_thread.html', array('config' => $config, 'board' => $board, 'post' => &$this, 'index' => $index)); + $hasnoko50 = $this->postCount() >= $config['noko50_min']; + + $built = Element('post_thread.html', array('config' => $config, 'board' => $board, 'post' => &$this, 'index' => $index, 'hasnoko50' => $hasnoko50, 'isnoko50' => $isnoko50)); return $built; } |
