X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=authorities%2Fauthorities-home.pl;h=8128e0cb797c7572ec0af74f6587a9597b8fc7d8;hb=5d6c092921919526ade501facb1220f8a108a08f;hp=f67f5c9c40e17f68e36ab6f9353c15ffd9c1ddda;hpb=7886297f05ece48185b2f046ae025a57643ee65c;p=koha_fer diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl index f67f5c9c40..8128e0cb79 100755 --- a/authorities/authorities-home.pl +++ b/authorities/authorities-home.pl @@ -31,6 +31,7 @@ use C4::AuthoritiesMarc; use C4::Acquisition; use C4::Koha; # XXX subfield_is_koha_internal_p use C4::Biblio; +use C4::Search::History; my $query = new CGI; my $dbh = C4::Context->dbh; @@ -97,6 +98,7 @@ if ( $op eq "do_search" ) { $orderby ); + ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => "authorities/searchresultlist.tmpl", @@ -108,6 +110,25 @@ if ( $op eq "do_search" ) { } ); + # search history + if (C4::Context->preference('EnableSearchHistory')) { + if ( $startfrom == 1) { + my $path_info = $query->url(-path_info=>1); + my $query_cgi_history = $query->url(-query=>1); + $query_cgi_history =~ s/^$path_info\?//; + $query_cgi_history =~ s/;/&/g; + + C4::Search::History::add({ + userid => $loggedinuser, + sessionid => $query->cookie("CGISESSID"), + query_desc => $value, + query_cgi => $query_cgi_history, + total => $total, + type => "authority", + }); + } + } + $template->param( marclist => $marclist, and_or => $and_or,