Bug 21318: Add control number as an option to search authority using Z39.50
authorJosef Moravec <josef.moravec@gmail.com>
Thu, 6 Sep 2018 09:46:35 +0000 (09:46 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 1 Oct 2018 11:11:37 +0000 (11:11 +0000)
1) Apply the patch
2) Go to administration and set up a z39.50 authority server, which does
support searching by control number (use attribute 12), you can use czech
national library server:
host: aleph.nkp.cz
port: 9991
base: aut-utf
format: MARC21
encoding: UTF-8
3) Try to find an authority by control number using z39.50 - if you use the server
recomended in point 2) there is web access to the base at
http://aleph.nkp.cz/eng/aut

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed a typo in a code comment and a whitespace issue in the template.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

C4/Breeding.pm
cataloguing/z3950_auth_search.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt

index 37f450d..b9d296e 100644 (file)
@@ -230,6 +230,7 @@ sub Z3950Search {
 sub _auth_build_query {
     my ( $pars ) = @_;
 
+    #FIXME These variables are not used
     my $nameany= $pars->{nameany};
     my $authorany= $pars->{authorany};
     my $authorpersonal= $pars->{authorpersonal};
@@ -253,6 +254,7 @@ sub _auth_build_query {
         title             => '@attr 1=4 "#term" ',
         uniformtitle      => '@attr 1=6 "#term" ',
         srchany           => '@attr 1=1016 "#term" ',
+        controlnumber     => '@attr 1=12 "#term" ',
     };
 
     my $zquery='';
index e65b8aa..405656d 100755 (executable)
@@ -43,6 +43,7 @@ my $srchany       = $input->param('srchany');
 my $op            = $input->param('op')||'';
 my $page            = $input->param('current_page') || 1;
 $page = $input->param('goto_page') if $input->param('changepage_goto');
+my $controlnumber    = $input->param('controlnumber');
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
         template_name   => "cataloguing/z3950_auth_search.tt",
@@ -63,6 +64,7 @@ $template->param(
     subjectsubdiv   => $subjectsubdiv,
     srchany      => $srchany,
     authid => $authid,
+    controlnumber => $controlnumber,
 );
 
 if ( $op ne "do_search" ) {
@@ -100,6 +102,7 @@ my $pars= {
         subjectsubdiv => $subjectsubdiv,
         srchany => $srchany,
         authid => $authid,
+        controlnumber => $controlnumber,
 };
 Z3950SearchAuth($pars, $template);
 output_html_with_http_headers $input, $cookie, $template->output;
index 7a4a279..dd6d26f 100644 (file)
@@ -26,6 +26,7 @@
                 <fieldset class="rows">
                 <ol>
                     <li><label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li>
+                    <li><label for="controlnumber">Control number: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li>
                     <li><label for="nameany">Name (any): </label> <input type="text" id="nameany" name="nameany" value="" /></li>
                     <li><label for="authorany">Author (any): </label> <input type="text" id="authorany" name="authorany" value="" /></li>
                     <li><label for="authorpersonal">Author (personal): </label> <input type="text" id="authorpersonal" name="authorpersonal" value="[% authorpersonal | html %]" /></li>