From 07c8555badb931ba3187d0589c4d599861ca4906 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 24 May 2013 07:54:42 -0400 Subject: [PATCH] [SIGNED-OFF] Bug 10330 - Rename system preference authoritysep to AuthoritySeperator Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) View some records with authorities 4) Note your previously set authority separator should still be in use Signed-off-by: Bernardo Gonzalez Kriegel No koha-qa errors. --- C4/AuthoritiesMarc.pm | 2 +- C4/Biblio.pm | 12 ++++++------ .../value_builder/unimarc_field_210c_bis.pl | 2 +- cataloguing/value_builder/unimarc_field_225a.pl | 2 +- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ .../en/modules/admin/preferences/cataloguing.pref | 2 +- 7 files changed, 18 insertions(+), 11 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 8bcddbc..7d61013 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -266,7 +266,7 @@ sub SearchAuthorities { ##Here we have to extract MARC record and $authid from ZEBRA AUTHORITIES my $rec=$oAResult->record($counter); - my $separator=C4::Context->preference('authoritysep'); + my $separator=C4::Context->preference('AuthoritySeparator'); my $authrecord = C4::Search::new_record_from_zebra( 'authorityserver', $rec->raw() diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 61e4c3b..60e6ead 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1808,7 +1808,7 @@ sub GetMarcSubjects { my @marcsubjects; my $subject_limit = C4::Context->preference("TraceCompleteSubfields") ? 'su,complete-subfield' : 'su'; - my $authoritysep = C4::Context->preference('authoritysep'); + my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator'); foreach my $field ( $record->field($fields_filter) ) { next unless ($field->tag() >= $mintag && $field->tag() <= $maxtag); @@ -1854,7 +1854,7 @@ sub GetMarcSubjects { code => $code, value => $value, link_loop => \@this_link_loop, - separator => (scalar @subfields_loop) ? $authoritysep : '' + separator => (scalar @subfields_loop) ? $AuthoritySeparator : '' }; } } @@ -1899,7 +1899,7 @@ sub GetMarcAuthors { } my @marcauthors; - my $authoritysep = C4::Context->preference('authoritysep'); + my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator'); foreach my $field ( $record->field($fields_filter) ) { next unless $field->tag() >= $mintag && $field->tag() <= $maxtag; @@ -1948,7 +1948,7 @@ sub GetMarcAuthors { code => $code, value => $value, link_loop => \@this_link_loop, - separator => (scalar @subfields_loop) ? $authoritysep : '' + separator => (scalar @subfields_loop) ? $AuthoritySeparator : '' }; } } @@ -2047,7 +2047,7 @@ sub GetMarcSeries { } my @marcseries; - my $authoritysep = C4::Context->preference('authoritysep'); + my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator'); foreach my $field ( $record->field($fields_filter) ) { next unless $field->tag() >= $mintag && $field->tag() <= $maxtag; @@ -2083,7 +2083,7 @@ sub GetMarcSeries { code => $code, value => $value, link_loop => \@link_loop, - separator => (scalar @subfields_loop) ? $authoritysep : '', + separator => (scalar @subfields_loop) ? $AuthoritySeparator : '', volumenum => $volume_number, } } diff --git a/cataloguing/value_builder/unimarc_field_210c_bis.pl b/cataloguing/value_builder/unimarc_field_210c_bis.pl index 420fa8f..d4014a8 100755 --- a/cataloguing/value_builder/unimarc_field_210c_bis.pl +++ b/cataloguing/value_builder/unimarc_field_210c_bis.pl @@ -88,7 +88,7 @@ sub plugin { my $index = $input->param('index'); my $result = $input->param('result'); my $editor_found = $input->param('editor_found'); - my $authoritysep = C4::Context->preference("authoritysep"); + my $AuthoritySeparator = C4::Context->preference("AuthoritySeparator"); warn Data::Dumper::Dumper $index; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( diff --git a/cataloguing/value_builder/unimarc_field_225a.pl b/cataloguing/value_builder/unimarc_field_225a.pl index daba32e..311bb9f 100755 --- a/cataloguing/value_builder/unimarc_field_225a.pl +++ b/cataloguing/value_builder/unimarc_field_225a.pl @@ -108,7 +108,7 @@ sub plugin { my $index = $input->param('index'); my $result = $input->param('result'); my $editor_found = $input->param('editor_found'); - my $authoritysep = C4::Context->preference("authoritysep"); + my $AuthoritySeparator = C4::Context->preference("AuthoritySeparator"); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 8dbf496..b34530e5 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -39,7 +39,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for Suggestion and reading history privacy',''), ('AuthDisplayHierarchy','0','','Display authority hierarchies','YesNo'), ('AuthoritiesLog','1',NULL,'If ON, log edit/create/delete actions on authorities.','YesNo'), -('authoritysep','--','10','Used to separate a list of authorities in a display. Usually --','free'), +('AuthoritySeparator','--','10','Used to separate a list of authorities in a display. Usually --','free'), ('autoBarcode','OFF','incremental|annual|hbyymmincr|EAN13|OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','Choice'), ('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'), ('AutoEmailOpacUser','0',NULL,'Sends notification emails containing new account details to patrons - when account is created.','YesNo'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 8aed2d6..0b01ee9 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8243,6 +8243,13 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.15.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("UPDATE systempreferences SET variable = 'AuthoritySeparator' WHERE variable = 'authoritysep'"); + print "Upgrade to $DBversion done (Bug 10330 - Rename system preference authoritysep to AuthoritySeparator)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) 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 169aec4..b6e0d2e 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 @@ -112,7 +112,7 @@ Cataloging: Display: - - 'Separate multiple displayed authors, series or subjects with ' - - pref: authoritysep + - pref: AuthoritySeparator class: short - '.' - -- 1.7.9.5