From: erickson Date: Mon, 21 Apr 2008 15:42:10 +0000 (+0000) Subject: added support for for truncation attribute to z39 queries. Thanks, James! X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4c162a71bfcdd8ed02c4d893f196390913730c40;p=Evergreen.git added support for for truncation attribute to z39 queries. Thanks, James! git-svn-id: svn://svn.open-ils.org/ILS/trunk@9395 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm index 9d84c1872e..dc4c001014 100755 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm @@ -329,8 +329,11 @@ sub compile_query { for( keys %$hash ) { next unless ( exists $services{$service}->{attrs}->{$_} ); $str .= '@attr 1=' . $services{$service}->{attrs}->{$_}->{code} . # add the use attribute - ' @attr 4=' . $services{$service}->{attrs}->{$_}->{format} . # add the structure attribute - " \"" . $$hash{$_} . "\" "; # add the search term + ' @attr 4=' . $services{$service}->{attrs}->{$_}->{format}; # add the structure attribute + if (exists $services{$service}->{attrs}->{$_}->{truncation}){ + $str .= ' @attr 5=' . $services{$service}->{attrs}->{$_}->{truncation}; + } + $str .= " \"" . $$hash{$_} . "\" "; # add the search term } return $str; }