Bugzilla – Attachment 37975 Details for
Bug 11300
Add a new authority linker which searches for authority links on a Z39.50 server.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11300 - correcting table z3950servers now uses 'servername' instead of 'name'
Bug-11300---correcting-table-z3950servers-now-uses.patch (text/plain), 8.76 KB, created by
Blou
on 2015-04-16 16:03:30 UTC
(
hide
)
Description:
Bug 11300 - correcting table z3950servers now uses 'servername' instead of 'name'
Filename:
MIME Type:
Creator:
Blou
Created:
2015-04-16 16:03:30 UTC
Size:
8.76 KB
patch
obsolete
>From 2485504c44f8fb3826b99a4769692593a89d0ea7 Mon Sep 17 00:00:00 2001 >From: Blou <philippe.blouin@inlibro.com> >Date: Thu, 16 Apr 2015 12:02:05 -0400 >Subject: [PATCH] Bug 11300 - correcting table z3950servers now uses > 'servername' instead of 'name' > >--- > C4/Breeding.pm | 39 ++++++++++++++++++++++ > C4/Linker/Z3950Server.pm | 2 +- > installer/data/mysql/sysprefs.sql | 2 ++ > .../prog/en/modules/acqui/z3950_search.tt | 13 ++++++++ > .../en/modules/admin/preferences/cataloguing.pref | 4 +++ > .../prog/en/modules/cataloguing/z3950_search.tt | 13 ++++++++ > 6 files changed, 72 insertions(+), 1 deletion(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index b5a4717..dcabdac 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -222,6 +222,19 @@ sub Z3950Search { > $oConnection[$_]->destroy(); > } > >+ my @servers = (); >+ foreach my $id (@id) { >+ push @servers, {id => $id}; >+ } >+ >+ my $pref_addnumber = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch'); >+ $pref_addnumber =~ s/\s+//g; >+ if ($pref_addnumber){ >+ $template->param( >+ additionalFields => '1', >+ ); >+ } >+ > $template->param( > breeding_loop => \@breeding_loop, > servers => \@servers, >@@ -340,6 +353,32 @@ sub _add_rowdata { > } > $row->{date}//= $row->{date2}; > $row->{isbn}=_isbn_replace($row->{isbn}); >+ >+ my $pref_addnumber = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch'); >+ $pref_addnumber =~ s/\s+//g; >+ my @addnumber_array = split /;/, $pref_addnumber; >+ my @addnumberfields; >+ foreach (@addnumber_array) { >+ my $length = length($_); >+ my $adTag = substr($_, 0, 3); >+ my $row_field = 'field_'.$adTag; >+ if ($record->field($adTag)) { >+ my $field = $record->field($adTag); >+ my $fieldContent=''; >+ if ($length > 3){ >+ my $adSubfield; >+ for (my $i=0; $i<$length-3; $i++){ >+ $adSubfield = substr($_, 3+$i, 1); >+ $fieldContent = $fieldContent.$field->subfield($adSubfield).' '; >+ } >+ push(@addnumberfields, $_); >+ $row->{$_} = $fieldContent; >+ } >+ } >+ } >+ >+ $row->{'addnumberfields'} = \@addnumberfields; >+ > return $row; > } > >diff --git a/C4/Linker/Z3950Server.pm b/C4/Linker/Z3950Server.pm >index fea3adf..da0a0af 100644 >--- a/C4/Linker/Z3950Server.pm >+++ b/C4/Linker/Z3950Server.pm >@@ -132,7 +132,7 @@ sub getZ3950Authority { > # Try to find a match on the Z39.50 server if LinkerZ3950Server is set > if(C4::Context->preference('LinkerZ3950Server')) { > unless($self->{'conn'}) { >- my $sth = C4::Context->dbh->prepare("select * from z3950servers where name=?"); >+ my $sth = C4::Context->dbh->prepare("select * from z3950servers where servername=?"); > $sth->execute(C4::Context->preference('LinkerZ3950Server')); > my $server = $sth->fetchrow_hashref or undef; > $sth->finish; >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 878214f..43f6f43 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -6,6 +6,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'), > ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'), > ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), >+('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'), >+('AddPatronLists','categorycode','categorycode|category_type','Allow user to choose what list to pick up from when adding patrons','Choice'), > ('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'), > ('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option. Example: eng|fre|ita','Textarea'), > ('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt >index 9b89e91..046e402 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt >@@ -168,6 +168,9 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <th>Author</th> > <th>ISBN</th> > <th>LCCN</th> >+ [% IF additionalFields %] >+ <th>Additional fields</th> >+ [% END %] > <th>Preview</th> > <th> </th> > </tr></thead> >@@ -180,6 +183,16 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <td>[% breeding_loo.author %]</td> > <td>[% breeding_loo.isbn %]</td> > <td>[% breeding_loo.lccn %]</td> >+ [% IF additionalFields %] >+ <td> >+ <dl> >+ [% FOREACH addnumberfield IN breeding_loo.addnumberfields %] >+ <dt>[% addnumberfield %]:</dt> >+ <dd>[% breeding_loo.$addnumberfield %]</dd> >+ [% END %] >+ </dl> >+ </td> >+ [% END %] > <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> |Â <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid %]" title="Card" rel="gb_page_center[600,500]">Card</a></td> > <td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode %]&breedingid=[% breeding_loo.breedingid %]&booksellerid=[% booksellerid %]&basketno=[% basketno %]">Order</a></td> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >index bc35aad..a879d32 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >@@ -215,3 +215,7 @@ Cataloging: > yes: "do" > no: "don't" > - attempt to match aggressively by trying all variations of the ISBNs in the imported record as a phrase in the ISBN fields of already cataloged records. Note that this preference has no effect if UseQueryParser is on. >+ - >+ - Determines the MARC field/subfields >+ - pref: AdditionalFieldsInZ3950ResultSearch >+ - "are displayed in 'Additional fields' column in the result of a search Z3950 (use semicolon as delimiter ex: <code>082ab</code>;<code>090ab</code>)" >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >index 79e8015..1ef8ed1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >@@ -185,6 +185,9 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <th>Edition</th> > <th>ISBN</th> > <th>LCCN</th> >+ [% IF additionalFields %] >+ <th>Additional fields</th> >+ [% END %] > <th>MARC</th> > <th>Card</th> > <th> </th> >@@ -200,6 +203,16 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <td>[% breeding_loo.edition %]</td> > <td>[% breeding_loo.isbn %]</td> > <td>[% breeding_loo.lccn %]</td> >+ [% IF additionalFields %] >+ <td> >+ <dl> >+ [% FOREACH addnumberfield IN breeding_loo.addnumberfields %] >+ <dt>[% addnumberfield %]:</dt> >+ <dd>[% breeding_loo.$addnumberfield %]</dd> >+ [% END %] >+ </dl> >+ </td> >+ [% END %] > <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">MARC</a></td> > <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td> > <td><a href="#" onclick="Import([% breeding_loo.breedingid %],[% breeding_loo.biblionumber %]); return false">Import</a></td> >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11300
:
23147
|
37918
|
37974
|
37975
|
37989
|
39649
|
45324
|
56542
|
56543
|
60999
|
67165
|
69096
|
69204
|
79400
|
94819
|
94875
|
111801
|
111896
|
115217
|
133496
|
136404
|
138029
|
141168
|
143292
|
148824
|
151079
|
151476
|
151477
|
155602
|
155603
|
159741
|
159742
|
163946
|
163947
|
171304
|
171689