From fad89a59b91852dca4b260a071930c8e3a5e1603 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Sat, 11 Jul 2015 17:36:18 +0200 Subject: [PATCH] Bug 14199: Database revision for marc21_orgcode.pl This patch adds the dbrev in atomicupdate, updating the marc structure for existing installations. (New installation in previous patch.) And it removes the obsolete plugin files. Test plan: Run upgrade. Verify that new plugin is linked (for bib and auth). Check plugin in editor. Signed-off-by: Bernardo Gonzalez Kriegel Plugin tested, added to 040a/c/d Test pass No koha-qa errors Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- cataloguing/value_builder/marc21_field_003.pl | 46 ------------------- .../value_builder/marc21_field_040c.pl | 45 ------------------ .../value_builder/marc21_field_040d.pl | 45 ------------------ .../mysql/atomicupdate/14199_MarcOrgCode.sql | 3 ++ 4 files changed, 3 insertions(+), 136 deletions(-) delete mode 100755 cataloguing/value_builder/marc21_field_003.pl delete mode 100755 cataloguing/value_builder/marc21_field_040c.pl delete mode 100755 cataloguing/value_builder/marc21_field_040d.pl create mode 100644 installer/data/mysql/atomicupdate/14199_MarcOrgCode.sql diff --git a/cataloguing/value_builder/marc21_field_003.pl b/cataloguing/value_builder/marc21_field_003.pl deleted file mode 100755 index 189a00a180..0000000000 --- a/cataloguing/value_builder/marc21_field_003.pl +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/perl - -# Converted to new plugin style (Bug 13437) - - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# Koha is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Koha; if not, see . - -use Modern::Perl; -use C4::Context; - -my $builder = sub { - my ( $params ) = @_; - my $function_name = $params->{id}; - - my $org = C4::Context->preference('MARCOrgCode'); - my $res = " - -"; - return $res; -}; - -return { builder => $builder }; \ No newline at end of file diff --git a/cataloguing/value_builder/marc21_field_040c.pl b/cataloguing/value_builder/marc21_field_040c.pl deleted file mode 100755 index 4409b1bbb3..0000000000 --- a/cataloguing/value_builder/marc21_field_040c.pl +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/perl - -# Converted to new plugin style (Bug 13437) - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# Koha is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Koha; if not, see . - -use Modern::Perl; -use C4::Context; - -my $builder = sub { - my ( $params ) = @_; - my $function_name = $params->{id}; - - my $org = C4::Context->preference('MARCOrgCode'); - my $res = " - -"; - return $res; -}; - -return { builder => $builder }; \ No newline at end of file diff --git a/cataloguing/value_builder/marc21_field_040d.pl b/cataloguing/value_builder/marc21_field_040d.pl deleted file mode 100755 index 4409b1bbb3..0000000000 --- a/cataloguing/value_builder/marc21_field_040d.pl +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/perl - -# Converted to new plugin style (Bug 13437) - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# Koha is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Koha; if not, see . - -use Modern::Perl; -use C4::Context; - -my $builder = sub { - my ( $params ) = @_; - my $function_name = $params->{id}; - - my $org = C4::Context->preference('MARCOrgCode'); - my $res = " - -"; - return $res; -}; - -return { builder => $builder }; \ No newline at end of file diff --git a/installer/data/mysql/atomicupdate/14199_MarcOrgCode.sql b/installer/data/mysql/atomicupdate/14199_MarcOrgCode.sql new file mode 100644 index 0000000000..16b4d36139 --- /dev/null +++ b/installer/data/mysql/atomicupdate/14199_MarcOrgCode.sql @@ -0,0 +1,3 @@ +-- move marc21_field_003.pl 040c and 040d to marc21_orgcode.pl +update marc_subfield_structure set value_builder='marc21_orgcode.pl' where value_builder IN ( 'marc21_field_003.pl', 'marc21_field_040c.pl', 'marc21_field_040d.pl' ); +update auth_subfield_structure set value_builder='marc21_orgcode.pl' where value_builder IN ( 'marc21_field_003.pl', 'marc21_field_040c.pl', 'marc21_field_040d.pl' ); -- 2.39.5