X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FGeneric.pm;h=209691994107b08e071a1c56d9bcb0bcd1d379b1;hb=1f5ed92571c41d36f93596c51c6ab0549dda8ce1;hp=e0eb290edc86991394206ecf67d0971f30b33a5a;hpb=66d79db1f31814685e69add0078dd2f8c7f9a871;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Generic.pm b/lib/Gruntmaster/Page/Generic.pm index e0eb290..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,11 +170,11 @@ thing { $_->{problem_name} = $_->{rs}->problem->name; $_->{size} = length $_->{source}; delete $_->{source}; - $_->{pageprefix} = $env->{'gruntmaster.page'} == -1 ? 'page/' : ''; } }; putsym 'Gruntmaster::Page::Pb::Entry::vary', sub { 'Authorization' }; putsym 'Gruntmaster::Page::Pb::Entry::max_age', sub { 600 }; +putsym 'Gruntmaster::Page::Log::max_age', sub { 10 }; 1