diff options
| author | 8chan <admin@8chan.co> | 2014-06-24 19:40:16 +0000 |
|---|---|---|
| committer | Fredrick Brennan <admin@8chan.co> | 2014-06-24 19:41:00 +0000 |
| commit | 9df6ca8dddb8dabfa30069cdf5f1e0bb45cea793 (patch) | |
| tree | dcb2cdb9570c4754f403d3774829fbc889cba554 /inc | |
| parent | 4eec65782eadd85cd71443f61934584546d192d4 (diff) | |
Fix issue #45
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/display.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/display.php b/inc/display.php index e5ce1da1..9397b4a9 100644 --- a/inc/display.php +++ b/inc/display.php @@ -380,10 +380,10 @@ class Post { $this->body ); } - public function link($pre = '') { + public function link($pre = '', $page = false) { global $config, $board; - return $this->root . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $this->thread) . '#' . $pre . $this->id; + return $this->root . $board['dir'] . $config['dir']['res'] . sprintf(($page ? $page : $config['file_page']), $this->thread) . '#' . $pre . $this->id; } public function build($index=false) { @@ -435,10 +435,10 @@ class Thread { $this->body ); } - public function link($pre = '') { + public function link($pre = '', $page = false) { global $config, $board; - return $this->root . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $this->id) . '#' . $pre . $this->id; + return $this->root . $board['dir'] . $config['dir']['res'] . sprintf(($page ? $page : $config['file_page']), $this->id) . '#' . $pre . $this->id; } public function add(Post $post) { $this->posts[] = $post; |
