Bugzilla – Attachment 117477 Details for
Bug 8976
Default sequence of subfields in cataloguing and item editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8976: Use existing Koha::Authority::Subfield[s]
Bug-8976-Use-existing-KohaAuthoritySubfields.patch (text/plain), 5.61 KB, created by
Jonathan Druart
on 2021-03-02 09:19:44 UTC
(
hide
)
Description:
Bug 8976: Use existing Koha::Authority::Subfield[s]
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-03-02 09:19:44 UTC
Size:
5.61 KB
patch
obsolete
>From da41053a3b299e06f64f2c4a97b735bb74997a60 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 2 Mar 2021 10:18:34 +0100 >Subject: [PATCH] Bug 8976: Use existing Koha::Authority::Subfield[s] > >--- > Koha/AuthSubfieldStructure.pm | 46 ------------------------ > Koha/AuthSubfieldStructures.pm | 58 ------------------------------- > admin/auth_subfields_structure.pl | 14 ++++---- > 3 files changed, 7 insertions(+), 111 deletions(-) > delete mode 100644 Koha/AuthSubfieldStructure.pm > delete mode 100644 Koha/AuthSubfieldStructures.pm > >diff --git a/Koha/AuthSubfieldStructure.pm b/Koha/AuthSubfieldStructure.pm >deleted file mode 100644 >index 93f90a0c9c..0000000000 >--- a/Koha/AuthSubfieldStructure.pm >+++ /dev/null >@@ -1,46 +0,0 @@ >-package Koha::AuthSubfieldStructure; >- >-# 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 <http://www.gnu.org/licenses>. >- >-use Modern::Perl; >- >-use Carp; >- >-use Koha::Database; >- >-use base qw(Koha::Object); >- >-=head1 NAME >- >-Koha::AuthSubfieldStructure - Koha AuthSubfieldStructure Object class >- >-=head1 API >- >-=head2 Class methods >- >-=cut >- >-=head2 Internal methods >- >-=head3 _type >- >-=cut >- >-sub _type { >- return 'AuthSubfieldStructure'; >-} >- >-1; >diff --git a/Koha/AuthSubfieldStructures.pm b/Koha/AuthSubfieldStructures.pm >deleted file mode 100644 >index 4995cb7f59..0000000000 >--- a/Koha/AuthSubfieldStructures.pm >+++ /dev/null >@@ -1,58 +0,0 @@ >-package Koha::AuthSubfieldStructures; >- >-# 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 <http://www.gnu.org/licenses>. >- >-use Modern::Perl; >- >-use Carp; >- >-use Koha::Database; >- >-use Koha::AuthSubfieldStructure; >- >-use base qw(Koha::Objects); >- >-=head1 NAME >- >-Koha::AuthSubfieldStructures - Koha AuthSubfieldStructure Object set class >- >-=head1 API >- >-=head2 Class methods >- >-=cut >- >-=head2 Internal methods >- >-=cut >- >-=head3 _type >- >-=cut >- >-sub _type { >- return 'AuthSubfieldStructure'; >-} >- >-=head3 object_class >- >-=cut >- >-sub object_class { >- return 'Koha::AuthSubfieldStructure'; >-} >- >-1; >diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl >index 2639f90275..817bf59d09 100755 >--- a/admin/auth_subfields_structure.pl >+++ b/admin/auth_subfields_structure.pl >@@ -26,7 +26,7 @@ use C4::Koha; > > use Koha::Authority::Types; > use Koha::AuthorisedValues; >-use Koha::AuthSubfieldStructures; >+use Koha::Authority::Subfields; > > use List::MoreUtils qw( uniq ); > >@@ -104,7 +104,7 @@ if ($op eq 'add_form') { > closedir DIR; > > my @loop_data; >- my $asses = Koha::AuthSubfieldStructures->search({ tagfield => $tagfield, authtypecode => $authtypecode}, {order_by => 'display_order'})->unblessed; >+ my $asses = Koha::Authority::Subfields->search({ tagfield => $tagfield, authtypecode => $authtypecode}, {order_by => 'display_order'})->unblessed; > my $i; > for my $ass ( @$asses ) { > my %row_data = %$ass; >@@ -181,7 +181,7 @@ if ($op eq 'add_form') { > my $hidden = $ohidden[$i]; #collate from 3 hiddens; > my $isurl = $input->param("isurl$i")?1:0; > if ($liblibrarian) { >- my $ass = Koha::AuthSubfieldStructures->find( >+ my $ass = Koha::Authority::Subfields->find( > { > authtypecode => $authtypecode, > tagfield => $tagfield, >@@ -209,7 +209,7 @@ if ($op eq 'add_form') { > $ass->update($attributes); > } > else { >- Koha::AuthSubfieldStructure->new( >+ Koha::Authority::Subfield->new( > { > authtypecode => $authtypecode, > tagfield => $tagfield, >@@ -229,7 +229,7 @@ if ($op eq 'add_form') { > # called by default form, used to confirm deletion of data in DB > } > elsif ( $op eq 'delete_confirm' ) { >- my $ass = Koha::AuthSubfieldStructures->find( >+ my $ass = Koha::Authority::Subfields->find( > { > authtypecode => $authtypecode, > tagfield => $tagfield, >@@ -242,7 +242,7 @@ elsif ( $op eq 'delete_confirm' ) { > ); > } > elsif ( $op eq 'delete_confirmed' ) { >- Koha::AuthSubfieldStructures->find( >+ Koha::Authority::Subfields->find( > { > authtypecode => $authtypecode, > tagfield => $tagfield, >@@ -253,7 +253,7 @@ elsif ( $op eq 'delete_confirmed' ) { > exit; > } > else { # DEFAULT >- my $ass = Koha::AuthSubfieldStructures->search( >+ my $ass = Koha::Authority::Subfields->search( > { > tagfield => { -like => "$tagfield%" }, > authtypecode => $authtypecode, >-- >2.20.1
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 8976
:
114345
|
114346
|
114347
|
114348
|
114349
|
114350
|
114351
|
114352
|
114353
|
114354
|
114355
|
114492
|
114493
|
114494
|
114495
|
114496
|
114497
|
114498
|
117147
|
117148
|
117149
|
117150
|
117151
|
117152
|
117153
|
117268
|
117269
|
117270
|
117271
|
117272
|
117273
|
117274
|
117275
|
117276
| 117477 |
117478