summaryrefslogtreecommitdiff
path: root/inc/display.php
diff options
context:
space:
mode:
authorSimon McFarlane <simon@piston.pw>2015-06-01 16:08:19 -0700
committerSimon McFarlane <simon@piston.pw>2015-06-01 16:08:19 -0700
commit209bc5400144e448e95a68e01d842c6fab53ae71 (patch)
treeab4cc6ad241e8daccb546514330d3a5f2906e846 /inc/display.php
parentd1c1e5a589f30d640f5eb6303e7059105a6297f8 (diff)
parent7ab9cc43d101ed002bce392beefe1c435ab2d5b1 (diff)
Merge pull request #18 from lainchan/vichan-merge
Merge with the latest upstream vichan
Diffstat (limited to 'inc/display.php')
-rw-r--r--inc/display.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/inc/display.php b/inc/display.php
index 1a78e19b..e7fb9320 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -383,7 +383,7 @@ class Post {
public function link($pre = '', $page = false) {
global $config, $board;
- return $this->root . $board['dir'] . $config['dir']['res'] . sprintf(($page ? $page : $config['file_page']), $this->thread) . '#' . $pre . $this->id;
+ return $this->root . $board['dir'] . $config['dir']['res'] . link_for((array)$this, $page == '50') . '#' . $pre . $this->id;
}
public function build($index=false) {
@@ -438,7 +438,7 @@ class Thread {
public function link($pre = '', $page = false) {
global $config, $board;
- return $this->root . $board['dir'] . $config['dir']['res'] . sprintf(($page ? $page : $config['file_page']), $this->id) . '#' . $pre . $this->id;
+ return $this->root . $board['dir'] . $config['dir']['res'] . link_for((array)$this, $page == '50') . '#' . $pre . $this->id;
}
public function add(Post $post) {
$this->posts[] = $post;
@@ -453,7 +453,8 @@ class Thread {
event('show-thread', $this);
- $built = Element('post_thread.html', array('config' => $config, 'board' => $board, 'post' => &$this, 'index' => $index, 'hasnoko50' => $hasnoko50, 'isnoko50' => $isnoko50, 'mod' => $this->mod));
+ $file = ($index && $config['file_board']) ? 'post_thread_fileboard.html' : 'post_thread.html';
+ $built = Element($file, array('config' => $config, 'board' => $board, 'post' => &$this, 'index' => $index, 'hasnoko50' => $hasnoko50, 'isnoko50' => $isnoko50, 'mod' => $this->mod));
return $built;
}