Bug 9282: (follow-up) remove log noise caused by authorities/ysearch.pl
[koha.git] / authorities / merge.pl
index 0c7a7ea..315e232 100755 (executable)
@@ -6,7 +6,7 @@
 #
 # 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 2 of the License, or (at your option) any later
+# 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
@@ -94,7 +94,7 @@ else {
         my $recordObj1 = Koha::Authority->get_from_authid($authid[0]) || Koha::Authority->new();
         my $recordObj2;
 
-        if ($mergereference eq 'breeding') {
+        if (defined $mergereference && $mergereference eq 'breeding') {
             $recordObj2 =  Koha::Authority->get_from_breeding($authid[1]) || Koha::Authority->new();
         } else {
             $recordObj2 =  Koha::Authority->get_from_authid($authid[1]) || Koha::Authority->new();
@@ -169,6 +169,8 @@ else {
                     frameworkselect => \@frameworkselect,
                     frameworkcode1  => $recordObj1->authtype,
                     frameworkcode2  => $recordObj2->authtype,
+                    frameworklabel1 => $frameworks->{$recordObj1->authtype}->{'authtypetext'},
+                    frameworklabel2 => $frameworks->{$recordObj2->authtype}->{'authtypetext'},
                 );
             }
         }