From 6a6fea8d8e88fd65eb650cf678daddce97a4b2ac Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Wed, 26 Mar 2014 22:32:06 +0200 Subject: [PATCH] Fix (hopefully) the page links in log.en --- lib/Gruntmaster/Page/Generic.pm | 2 +- tmpl/log.en | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Gruntmaster/Page/Generic.pm b/lib/Gruntmaster/Page/Generic.pm index 317fc6a..2096919 100644 --- a/lib/Gruntmaster/Page/Generic.pm +++ b/lib/Gruntmaster/Page/Generic.pm @@ -38,6 +38,7 @@ sub list { $rs = $rs->search(undef, {order_by => 'me.id'}) unless $rs->is_ordered; if (my $page = $env->{'gruntmaster.page'}) { my $pages = int ($rs->count / PAGE_SIZE); + $params{default_page} = $page == -1; $pages = 1 if $pages < 1; $page = $pages if $page == -1; @params{'page', 'pages'} = ($page, $pages); @@ -169,7 +170,6 @@ thing { $_->{problem_name} = $_->{rs}->problem->name; $_->{size} = length $_->{source}; delete $_->{source}; - $_->{pageprefix} = $env->{'gruntmaster.page'} && $env->{'gruntmaster.page'} == -1 ? 'page/' : ''; } }; diff --git a/tmpl/log.en b/tmpl/log.en index d4229d6..c04c963 100644 --- a/tmpl/log.en +++ b/tmpl/log.en @@ -12,6 +12,6 @@ -- 2.39.2