forked from leftypol/leftypol
support for slugified links; may introduce a few bugs
This commit is contained in:
parent
eb245c2970
commit
bdb6001f3f
18 changed files with 145 additions and 43 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue