Bug 2889: Adds table highlighting to the Authority search results.
[koha.git] / opac / opac-topissues.pl
index cc3a716..7bcf54e 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -85,16 +84,19 @@ while (my $line= $sth->fetchrow_hashref) {
     push @results, $line;
 }
 
+if($timeLimit eq 999){ $timeLimit = 0 };
+
 $template->param(do_it => 1,
                 limit => $limit,
                 branch => $branches->{$branch}->{branchname},
                 itemtype => $itemtypes->{$itemtype}->{description},
                 timeLimit => $timeLimit,
+                timeLimitFinite => $timeLimit,
                 results_loop => \@results,
                 );
 
-# load the branches
-my $branches = GetBranches();
+# load the branches            ## again??
+$branches = GetBranches();
 my @branch_loop;
 for my $branch_hash (sort keys %$branches ) {
     my $selected=(C4::Context->userenv && ($branch_hash eq C4::Context->userenv->{branch})) if (C4::Context->preference('SearchMyLibraryFirst'));
@@ -108,7 +110,7 @@ for my $branch_hash (sort keys %$branches ) {
 $template->param( branchloop => \@branch_loop, "mylibraryfirst"=>C4::Context->preference("SearchMyLibraryFirst"));
 
 #doctype
-my $itemtypes = GetItemTypes;
+$itemtypes = GetItemTypes;
 my @itemtypeloop;
 foreach my $thisitemtype (keys %$itemtypes) {
         my %row =(value => $thisitemtype,
@@ -119,6 +121,7 @@ foreach my $thisitemtype (keys %$itemtypes) {
 
 $template->param(
                  itemtypeloop =>\@itemtypeloop,
+                 dateformat    => C4::Context->preference("dateformat"),
                 );
 output_html_with_http_headers $input, $cookie, $template->output;