Bugzilla – Attachment 89414 Details for
Bug 21280
Unify MARC editor in biblios and authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21280: (follow-up) Refactor build_tabs to return array for better transparency
Bug-21280-follow-up-Refactor-buildtabs-to-return-a.patch (text/plain), 3.68 KB, created by
Josef Moravec
on 2019-05-07 06:29:11 UTC
(
hide
)
Description:
Bug 21280: (follow-up) Refactor build_tabs to return array for better transparency
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2019-05-07 06:29:11 UTC
Size:
3.68 KB
patch
obsolete
>From 19986c34ef647f0858f3f234305bd5937be3db2c Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Mon, 6 May 2019 21:01:26 +0000 >Subject: [PATCH] Bug 21280: (follow-up) Refactor build_tabs to return array > for better transparency > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > Koha/MarcEditor.pm | 10 +++++----- > authorities/authorities.pl | 4 ++-- > cataloguing/addbiblio.pl | 4 ++-- > 3 files changed, 9 insertions(+), 9 deletions(-) > >diff --git a/Koha/MarcEditor.pm b/Koha/MarcEditor.pm >index b7c94c0..67fcaf7 100644 >--- a/Koha/MarcEditor.pm >+++ b/Koha/MarcEditor.pm >@@ -71,14 +71,14 @@ sub new { > > =head3 build_tabs > >- $editor->build_tabs($template, $record, $encoding); >+ my @tabs = $editor->build_tabs($record, $encoding); > >-Builds tab data in the template >+Builds tab data for the template > > =cut > > sub build_tabs { >- my ( $self, $template, $record, $encoding ) = @_; >+ my ( $self, $record, $encoding ) = @_; > > # fill arrays > my @loop_data = (); >@@ -90,7 +90,7 @@ sub build_tabs { > my %seen; > my @tab_data; # all tags to display > my $max_num_tab=-1; >- my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber" ); >+ my ( $itemtag, $itemsubfield ) = C4::Biblio::GetMarcFromKohaField( "items.itemnumber" ); > > if (defined $self->{used_tags}) { > foreach my $used ( @{$self->{used_tags}} ) { >@@ -287,7 +287,7 @@ sub build_tabs { > }; > } > } >- $template->param( BIG_LOOP => \@BIG_LOOP ); >+ return \@BIG_LOOP; > } > > =head2 Internal methods >diff --git a/authorities/authorities.pl b/authorities/authorities.pl >index cec9d94..49fd2ae 100755 >--- a/authorities/authorities.pl >+++ b/authorities/authorities.pl >@@ -176,7 +176,7 @@ if ($op eq "add") { > exit; > } else { > # it may be a duplicate, warn the user and do nothing >- $editor->build_tabs($template, $record, $encoding); >+ $template->param( BIG_LOOP => $editor->build_tabs($record, $encoding) ); > $template->param(authid =>$authid, > duplicateauthid => $duplicateauthid, > duplicateauthvalue => $duplicateauthvalue->{'authorized'}->[0]->{'heading'}, >@@ -196,7 +196,7 @@ if ($op eq "duplicate") > { > $authid = ""; > } >- $editor->build_tabs ($template, $record, $encoding); >+ $template->param( BIG_LOOP => $editor->build_tabs($record, $encoding) ); > $template->param(oldauthtypetagfield=>$oldauthtypetagfield, oldauthtypetagsubfield=>$oldauthtypetagsubfield, > oldauthnumtagfield=>$oldauthnumtagfield, oldauthnumtagsubfield=>$oldauthnumtagsubfield, > authid => $authid , authtypecode=>$authtypecode, ); >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 9181952..53ad86c 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -408,7 +408,7 @@ if ( $op eq "addbiblio" ) { > } > } else { > # it may be a duplicate, warn the user and do nothing >- $editor->build_tabs($template, $record, $encoding); >+ $template->param( BIG_LOOP => $editor->build_tabs($record, $encoding) ); > $template->param( > biblionumber => $biblionumber, > biblioitemnumber => $biblioitemnumber, >@@ -455,7 +455,7 @@ elsif ( $op eq "delete" ) { > $record = $urecord; > }; > } >- $editor->build_tabs( $template, $record, $encoding ); >+ $template->param( BIG_LOOP => $editor->build_tabs( $record, $encoding ) ); > $template->param( > biblionumber => $biblionumber, > biblionumbertagfield => $biblionumbertagfield, >-- >2.1.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 21280
:
78214
|
85502
|
85503
|
85504
|
85517
|
85518
|
85519
|
85520
|
87311
|
87312
|
87313
|
87314
|
87318
|
87319
|
87320
|
87321
|
89407
|
89408
|
89409
|
89410
|
89411
|
89412
|
89413
| 89414