Remove this hard-coded path stuff
This commit is contained in:
parent
7b74dbe787
commit
8ea06cf0eb
|
@ -45,7 +45,7 @@ group {
|
|||
under 'view';
|
||||
|
||||
get '/:page', [page => qr/[0-9]+/], {page => 1}, sub ($c) {
|
||||
my $base_path = '/view';
|
||||
my $base_path = $c->match->path_for(page => undef)->{'path'};
|
||||
my $this_page = $c->param('page');
|
||||
my $last_page = $c->thread->get_last_page();
|
||||
my $threads = $c->thread->get_threads_by_page($this_page);
|
||||
|
@ -128,6 +128,10 @@ if (my $threads_per_page = app->config->{'threads_per_page'}) {
|
|||
app->thread->threads_per_page($threads_per_page);
|
||||
}
|
||||
|
||||
if (my $remarks_per_page = app->config->{'remarks_per_page'}) {
|
||||
app->remark->remarks_per_page($remarks_per_page);
|
||||
}
|
||||
|
||||
app->asset->process('main.css', 'css/PostText.css');
|
||||
|
||||
# Send it
|
||||
|
|
|
@ -29,4 +29,8 @@ sub get_remarks_by_thread_id($self, $thread_id) {
|
|||
END_SQL
|
||||
}
|
||||
|
||||
sub remarks_per_page($self, $value = undef) {
|
||||
$self->{'remarks_per_page'} = $value // $self->{'remarks_per_page'};
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in a new issue