From: Marius Gavrilescu Date: Wed, 26 Mar 2014 20:32:06 +0000 (+0200) Subject: Fix (hopefully) the page links in log.en X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=6a6fea8d8e88fd65eb650cf678daddce97a4b2ac;p=gruntmaster-page.git Fix (hopefully) the page links in log.en --- 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 @@