Bug 20494: Remove unused code in neworderempty.pl and addbiblio.pl
authorNick Clemens <nick@bywatersolutions.com>
Thu, 29 Mar 2018 12:33:56 +0000 (12:33 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 2 Apr 2018 21:07:45 +0000 (18:07 -0300)
Should be sufficient to read code and see all lines were commented and
that this patch removes useless lines

To be thorough, ensure that your can add an order to a basket and add a
biblio.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
acqui/neworderempty.pl
cataloguing/addbiblio.pl

index 680be6a..e9dcc2d 100755 (executable)
@@ -418,7 +418,6 @@ sub MARCfindbreeding {
             {
                 my ( $tag, $subfield ) = GetMarcFromKohaField("biblio.author", '');
 
-#                 my $summary = C4::Context->preference("z3950authortemplate");
                 my $auth_fields =
                 C4::Context->preference("z3950AuthorAuthFields");
                 my @auth_fields = split /,/, $auth_fields;
@@ -427,7 +426,6 @@ sub MARCfindbreeding {
                 if ( $record->field($tag) ) {
                     foreach my $tmpfield ( $record->field($tag)->subfields ) {
 
-    #                        foreach my $subfieldcode ($tmpfield->subfields){
                         my $subfieldcode  = shift @$tmpfield;
                         my $subfieldvalue = shift @$tmpfield;
                         if ($field) {
@@ -451,16 +449,12 @@ 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 );
                     }
                     else {
-
-#                       $field->add_subfields("$subfield"=>"[ ".ucfirst($firstname).", ".ucfirst($lastname)." ]");
                         $field->add_subfields(
                             "$subfield" => ucfirst($firstname) . ", "
                             . ucfirst($lastname) );
index 17557b4..4ecaf69 100755 (executable)
@@ -107,7 +107,6 @@ sub MARCfindbreeding {
             {
                 my ( $tag, $subfield ) = GetMarcFromKohaField("biblio.author", '');
 
- #                 my $summary = C4::Context->preference("z3950authortemplate");
                 my $auth_fields =
                   C4::Context->preference("z3950AuthorAuthFields");
                 my @auth_fields = split /,/, $auth_fields;
@@ -116,7 +115,6 @@ sub MARCfindbreeding {
                 if ( $record->field($tag) ) {
                     foreach my $tmpfield ( $record->field($tag)->subfields ) {
 
-       #                        foreach my $subfieldcode ($tmpfield->subfields){
                         my $subfieldcode  = shift @$tmpfield;
                         my $subfieldvalue = shift @$tmpfield;
                         if ($field) {
@@ -140,16 +138,12 @@ 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 );
                     }
                     else {
-
-#                       $field->add_subfields("$subfield"=>"[ ".ucfirst($firstname).", ".ucfirst($lastname)." ]");
                         $field->add_subfields(
                             "$subfield" => ucfirst($firstname) . ", "
                               . ucfirst($lastname) );