display details and back doesn't reset page to 1
[webpac] / WebPac.pm
index 5911d54..42d423c 100644 (file)
--- a/WebPac.pm
+++ b/WebPac.pm
@@ -14,7 +14,7 @@ use index_DBI;
 use back2html;
 
 # configuration options
-# FIX: they really should go in configuration file!
+# FIXME they really should go in configuration file!
 my $TEMPLATE_PATH = '/data/webpac/template_html';
 my $CHARSET = 'ISO-8859-2';
 my $SWISH = '/usr/bin/swish-e';
@@ -137,6 +137,9 @@ sub show_results_list {
        $tmpl->param('hits',$hits);
        $tmpl->param('search',$sw_q);
 
+       $tmpl->param('PAGER_offset',$q->param("PAGER_offset") || 0);
+       $tmpl->param('last_PAGER_offset',$q->param("last_PAGER_offset") || 0);
+
        # create a Pager object
        my $pager = HTML::Pager->new(
                # required parameters
@@ -204,7 +207,7 @@ sub show_index {
        $tmpl->param('limit',$limit);
        $tmpl->param('total',$total);
 
-# FIX: I should set offset and leave out limit from fetch!!
+# FIXME I should set offset and leave out limit from fetch!!
 #      if (! $q->param("PAGER_offset") {
 #              $q->param("Pager_offet)
 #      }