forked from leftypol/leftypol
Merge branch 'noko50-new-dev11' of http://github.com/fallenPineapple/Tinyboard
Conflicts: inc/functions.php
This commit is contained in:
commit
8534e2cc80
7 changed files with 156 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue