Bugzilla – Attachment 22716 Details for
Bug 11200
Adding subfield without field in addbiblio.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11200 - Adding subfield without field in addbiblio.pl
0001-Bug-11200-Adding-subfield-without-field-in-addbibl.patch (text/plain), 2.66 KB, created by
Nuño López Ansótegui
on 2013-11-05 10:32:57 UTC
(
hide
)
Description:
Bug 11200 - Adding subfield without field in addbiblio.pl
Filename:
MIME Type:
Creator:
Nuño López Ansótegui
Created:
2013-11-05 10:32:57 UTC
Size:
2.66 KB
patch
obsolete
>From 6648062014476d4d49dabda4f3838d4a1c9071ab Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?Nu=C3=B1o=20L=C3=B3pez=20Ans=C3=B3tegui?= <nunyo@masmedios.com> >Date: Tue, 5 Nov 2013 11:06:36 +0100 >Subject: [PATCH] Bug 11200 - Adding subfield without field in addbiblio.pl > >--- > cataloguing/addbiblio.pl | 32 ++++++++++++++++++++++---------- > 1 files changed, 22 insertions(+), 10 deletions(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 5069af9..390ea1a 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -134,19 +134,31 @@ sub MARCfindbreeding { > my $title = $record->field($fieldtag)->subfield('c'); > my $number = $record->field($fieldtag)->subfield('d'); > if ($title) { >- >-# $field->add_subfields("$subfield"=>"[ ".ucfirst($title).ucfirst($firstname)." ".$number." ]"); >- $field->add_subfields( >- "$subfield" => ucfirst($title) . " " >- . ucfirst($firstname) . " " >- . $number ); >+ if ($field) { >+ $field->add_subfields( >+ "$subfield" => ucfirst($title) . " " >+ . ucfirst($firstname) . " " >+ . $number ); >+ }else{ >+ $field = >+ MARC::Field->new( $tag, "", "", >+ $subfield => ucfirst($title) . " " >+ . ucfirst($firstname) . " " >+ . $number ); >+ } > } > else { > >-# $field->add_subfields("$subfield"=>"[ ".ucfirst($firstname).", ".ucfirst($lastname)." ]"); >- $field->add_subfields( >- "$subfield" => ucfirst($firstname) . ", " >- . ucfirst($lastname) ); >+ if ($field) { >+ $field->add_subfields( >+ "$subfield" => ucfirst($firstname) . ", " >+ . ucfirst($lastname) ); >+ }else{ >+ $field = >+ MARC::Field->new( $tag, "", "", >+ $subfield => ucfirst($firstname) . ", " >+ . ucfirst($lastname) ); >+ } > } > } > $record->insert_fields_ordered($field); >-- >1.5.6.5 >
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 11200
: 22716