From f3c2eae74c69fea3dfc0e453a07f2b2461330c49 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Thu, 6 Sep 2018 09:46:35 +0000 Subject: [PATCH] Bug 21318: Add control number as an option to search authority using Z39.50 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 Signed-off-by: Katrin Fischer Fixed a typo in a code comment and a whitespace issue in the template. Signed-off-by: Nick Clemens --- C4/Breeding.pm | 2 ++ cataloguing/z3950_auth_search.pl | 3 +++ .../prog/en/modules/cataloguing/z3950_auth_search.tt | 1 + 3 files changed, 6 insertions(+) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index 37f450d39c..b9d296e068 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -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=''; diff --git a/cataloguing/z3950_auth_search.pl b/cataloguing/z3950_auth_search.pl index e65b8aabed..405656de56 100755 --- a/cataloguing/z3950_auth_search.pl +++ b/cataloguing/z3950_auth_search.pl @@ -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; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt index 7a4a279f73..dd6d26f6ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt @@ -26,6 +26,7 @@
  1. +
  2. -- 2.39.5