Lines 2251-2257
$arrayref = z3950_search_args($matchpoints)
Link Here
|
2251 |
|
2251 |
|
2252 |
This function returns an array reference that contains the search parameters to be |
2252 |
This function returns an array reference that contains the search parameters to be |
2253 |
passed to the Z39.50 search script (z3950_search.pl). The array elements |
2253 |
passed to the Z39.50 search script (z3950_search.pl). The array elements |
2254 |
are hash refs whose keys are name, value and encvalue, and whose values are the |
2254 |
are hash refs whose keys are name and value, and whose values are the |
2255 |
name of a search parameter, the value of that search parameter and the URL encoded |
2255 |
name of a search parameter, the value of that search parameter and the URL encoded |
2256 |
value of that parameter. |
2256 |
value of that parameter. |
2257 |
|
2257 |
|
Lines 2262-2268
data is in a hash reference in $matchpoints, as returned by Biblio::GetBiblioDat
Link Here
|
2262 |
|
2262 |
|
2263 |
If $matchpoints is a scalar, it is assumed to be an unnamed query descriptor, e.g. |
2263 |
If $matchpoints is a scalar, it is assumed to be an unnamed query descriptor, e.g. |
2264 |
a general purpose search argument. In this case, the returned array contains only |
2264 |
a general purpose search argument. In this case, the returned array contains only |
2265 |
entry: the key is 'title' and the value and encvalue are derived from $matchpoints. |
2265 |
entry: the key is 'title' and the value is derived from $matchpoints. |
2266 |
|
2266 |
|
2267 |
If a search parameter value is undefined or empty, it is not included in the returned |
2267 |
If a search parameter value is undefined or empty, it is not included in the returned |
2268 |
array. |
2268 |
array. |
Lines 2309-2316
sub z3950_search_args {
Link Here
|
2309 |
my $array = []; |
2309 |
my $array = []; |
2310 |
for my $field (qw/ lccn isbn issn title author dewey subject /) |
2310 |
for my $field (qw/ lccn isbn issn title author dewey subject /) |
2311 |
{ |
2311 |
{ |
2312 |
my $encvalue = URI::Escape::uri_escape_utf8($bibrec->{$field}); |
2312 |
push @$array, { name => $field, value => $bibrec->{$field} } |
2313 |
push @$array, { name=>$field, value=>$bibrec->{$field}, encvalue=>$encvalue } if defined $bibrec->{$field}; |
2313 |
if defined $bibrec->{$field}; |
2314 |
} |
2314 |
} |
2315 |
return $array; |
2315 |
return $array; |
2316 |
} |
2316 |
} |