Bugzilla – Attachment 9264 Details for
Bug 6931
hardcoded insert incompatible with UNIMARC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6931 : Only update frameworks for the correct marcflavour
Bug-6931--Only-update-frameworks-for-the-correct-m.patch (text/plain), 2.40 KB, created by
Chris Cormack
on 2012-04-19 21:53:35 UTC
(
hide
)
Description:
Bug 6931 : Only update frameworks for the correct marcflavour
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-04-19 21:53:35 UTC
Size:
2.40 KB
patch
obsolete
>From d62e8fc2796acb801c56967a45097125fe1a62e2 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Fri, 20 Apr 2012 09:52:04 +1200 >Subject: [PATCH] Bug 6931 : Only update frameworks for the correct > marcflavour > >--- > installer/data/mysql/updatedatabase.pl | 31 ++++++++++++++++++------------- > 1 files changed, 18 insertions(+), 13 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index e140ff3..40819c6 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -3974,20 +3974,25 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > } > > $DBversion = "3.03.00.015"; >-if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >- my $sth = $dbh->prepare("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ if ( C4::Context->preference("marcflavour") eq "MARC21" ) { >+ my $sth = $dbh->prepare( >+"INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, > `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) >- VALUES ( ?, '9', '9 (RLIN)', '9 (RLIN)', 0, 0, '', 6, '', '', '', 0, -5, '', '', '', NULL)"); >- $sth->execute('648'); >- $sth->execute('654'); >- $sth->execute('655'); >- $sth->execute('656'); >- $sth->execute('657'); >- $sth->execute('658'); >- $sth->execute('662'); >- $sth->finish; >- print "Upgrade to $DBversion done (Bug 5619: Add subfield 9 to marc21 648,654,655,656,657,658,662)\n"; >- SetVersion ($DBversion); >+ VALUES ( ?, '9', '9 (RLIN)', '9 (RLIN)', 0, 0, '', 6, '', '', '', 0, -5, '', '', '', NULL)" >+ ); >+ $sth->execute('648'); >+ $sth->execute('654'); >+ $sth->execute('655'); >+ $sth->execute('656'); >+ $sth->execute('657'); >+ $sth->execute('658'); >+ $sth->execute('662'); >+ $sth->finish; >+ print >+"Upgrade to $DBversion done (Bug 5619: Add subfield 9 to marc21 648,654,655,656,657,658,662)\n"; >+ } >+ SetVersion($DBversion); > } > > $DBversion = '3.03.00.016'; >-- >1.7.5.4
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 6931
: 9264