Fix post count
This commit is contained in:
parent
53f292ac7c
commit
02b087a38e
|
@ -39,6 +39,8 @@ under sub ($c) {
|
||||||
|
|
||||||
$c->stash(status => 403) if $c->flash('error');
|
$c->stash(status => 403) if $c->flash('error');
|
||||||
|
|
||||||
|
$c->stash(post_count => format_number $c->message->get_post_count);
|
||||||
|
|
||||||
1;
|
1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -46,13 +48,11 @@ get '/' => sub ($c) {
|
||||||
my $this_page = $c->param('page') || 1;
|
my $this_page = $c->param('page') || 1;
|
||||||
my $last_page = $c->message->get_last_page();
|
my $last_page = $c->message->get_last_page();
|
||||||
my $view_posts = $c->message->get_posts($this_page);
|
my $view_posts = $c->message->get_posts($this_page);
|
||||||
my $post_count = format_number $c->message->get_post_count();
|
|
||||||
|
|
||||||
$c->stash(
|
$c->stash(
|
||||||
view_posts => $view_posts,
|
view_posts => $view_posts,
|
||||||
this_page => $this_page,
|
this_page => $this_page,
|
||||||
last_page => $last_page,
|
last_page => $last_page
|
||||||
post_count => $post_count
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$c->render();
|
$c->render();
|
||||||
|
|
Loading…
Reference in a new issue