Lines 56-61
if ( $op eq "cud-do_search" ) {
Link Here
|
56 |
my $orderby = $query->param('orderby'); |
56 |
my $orderby = $query->param('orderby'); |
57 |
my @value = $query->multi_param('value'); |
57 |
my @value = $query->multi_param('value'); |
58 |
$value[0] ||= q||; |
58 |
$value[0] ||= q||; |
|
|
59 |
my $value_history = $value[0]; |
60 |
|
61 |
if ( C4::Context->preference('OPACAlwaysSearchKeyword') ) { |
62 |
my $always_search_kw = C4::Context->preference('OPACAlwaysSearchKeyword'); |
63 |
$always_search_kw =~ s/^\s+|\s+$//g; |
64 |
$value[0] = $value[0] . " " . $always_search_kw; |
65 |
} |
59 |
|
66 |
|
60 |
# validation of "Where" |
67 |
# validation of "Where" |
61 |
my @valid_marc_list = qw( all match mainentry ); |
68 |
my @valid_marc_list = qw( all match mainentry ); |
Lines 82-88
if ( $op eq "cud-do_search" ) {
Link Here
|
82 |
$template->param( search_query => $search_query ) if C4::Context->preference('DumpSearchQueryTemplate'); |
89 |
$template->param( search_query => $search_query ) if C4::Context->preference('DumpSearchQueryTemplate'); |
83 |
|
90 |
|
84 |
# multi page display gestion |
91 |
# multi page display gestion |
85 |
my $value_url = uri_escape_utf8($value[0]); |
92 |
my $value_url = uri_escape_utf8($value_history); |
86 |
my $base_url = "opac-authorities-home.pl?" |
93 |
my $base_url = "opac-authorities-home.pl?" |
87 |
."marclist=$marclist[0]" |
94 |
."marclist=$marclist[0]" |
88 |
."&and_or=$and_or[0]" |
95 |
."&and_or=$and_or[0]" |
Lines 158-164
if ( $op eq "cud-do_search" ) {
Link Here
|
158 |
unless ( $loggedinuser ) { |
165 |
unless ( $loggedinuser ) { |
159 |
my $new_search = C4::Search::History::add_to_session({ |
166 |
my $new_search = C4::Search::History::add_to_session({ |
160 |
cgi => $query, |
167 |
cgi => $query, |
161 |
query_desc => $value[0], |
168 |
query_desc => $value_history, |
162 |
query_cgi => $query_cgi_history, |
169 |
query_cgi => $query_cgi_history, |
163 |
total => $total, |
170 |
total => $total, |
164 |
type => "authority", |
171 |
type => "authority", |
Lines 168-174
if ( $op eq "cud-do_search" ) {
Link Here
|
168 |
C4::Search::History::add({ |
175 |
C4::Search::History::add({ |
169 |
userid => $loggedinuser, |
176 |
userid => $loggedinuser, |
170 |
sessionid => $query->cookie("CGISESSID"), |
177 |
sessionid => $query->cookie("CGISESSID"), |
171 |
query_desc => $value[0], |
178 |
query_desc => $value_history, |
172 |
query_cgi => $query_cgi_history, |
179 |
query_cgi => $query_cgi_history, |
173 |
total => $total, |
180 |
total => $total, |
174 |
type => "authority", |
181 |
type => "authority", |