Bugzilla – Attachment 33030 Details for
Bug 11319
Marc modification templates improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11319: [QA follow-up] Remove a warning from GetModificationTemplates
Bug-11319-QA-follow-up-Remove-a-warning-from-GetMo.patch (text/plain), 1.72 KB, created by
Marcel de Rooy
on 2014-10-31 09:40:26 UTC
(
hide
)
Description:
Bug 11319: [QA follow-up] Remove a warning from GetModificationTemplates
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-10-31 09:40:26 UTC
Size:
1.72 KB
patch
obsolete
>From 0d2ff7d39cbf5df5ea45057c9f6f9d083bbe96b8 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 31 Oct 2014 10:14:16 +0100 >Subject: [PATCH] Bug 11319: [QA follow-up] Remove a warning from > GetModificationTemplates >Content-Type: text/plain; charset=utf-8 > >Removes this warning: Use of uninitialized value $template_id in string eq >at C4/MarcModificationTemplates.pm line 84. > >GetModificationTemplates has no template_id if called from >marc_modification_templates.pl without operation (first click from >interface) and from tools/stage-marc-import.pl. > >Slightly adjusted the POD lines accordingly. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/MarcModificationTemplates.pm | 8 +++++--- > 1 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/C4/MarcModificationTemplates.pm b/C4/MarcModificationTemplates.pm >index 52b28fe..a428313 100644 >--- a/C4/MarcModificationTemplates.pm >+++ b/C4/MarcModificationTemplates.pm >@@ -66,9 +66,10 @@ files telling Koha what fields to insert data into. > > =head2 GetModificationTemplates > >- my @templates = GetModificationTemplates( [ $template_id ] ); >+ my @templates = GetModificationTemplates( $template_id ); >+ >+ Passing optional $template_id marks it as the selected template. > >- Passing a $template_id will mark the given id as the selected template. > =cut > > sub GetModificationTemplates { >@@ -81,7 +82,8 @@ sub GetModificationTemplates { > > my @templates; > while ( my $template = $sth->fetchrow_hashref() ) { >- $template->{'selected'} = 1 if ( $template->{'template_id'} eq $template_id ); >+ $template->{'selected'} = 1 >+ if $template_id && $template->{'template_id'} eq $template_id; > push( @templates, $template ); > } > >-- >1.7.7.6
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 11319
:
23206
|
23414
|
23415
|
23416
|
23417
|
23418
|
23419
|
24650
|
25751
|
25752
|
25753
|
25754
|
25755
|
28988
|
28989
|
28990
|
28991
|
28992
|
29497
|
29498
|
29499
|
29500
|
29501
|
31343
|
33029
|
33030
|
33038
|
33039
|
33040
|
33041
|
33042
|
33043
|
33044