View | Details | Raw Unified | Return to bug 5202
Collapse All | Expand All

(-)a/authorities/merge.pl (-2 / +21 lines)
Lines 96-102 else { Link Here
96
96
97
        if ($mergereference eq 'breeding') {
97
        if ($mergereference eq 'breeding') {
98
            $recordObj2 =  Koha::Authority->get_from_breeding($authid[1]) || Koha::Authority->new();
98
            $recordObj2 =  Koha::Authority->get_from_breeding($authid[1]) || Koha::Authority->new();
99
            $mergereference = $authid[0];
100
        } else {
99
        } else {
101
            $recordObj2 =  Koha::Authority->get_from_authid($authid[1]) || Koha::Authority->new();
100
            $recordObj2 =  Koha::Authority->get_from_authid($authid[1]) || Koha::Authority->new();
102
        }
101
        }
Lines 106-116 else { Link Here
106
            my $framework;
105
            my $framework;
107
            if ( $recordObj1->authtype ne $recordObj2->authtype && $mergereference ne 'breeding' ) {
106
            if ( $recordObj1->authtype ne $recordObj2->authtype && $mergereference ne 'breeding' ) {
108
                $framework = $input->param('frameworkcode')
107
                $framework = $input->param('frameworkcode')
109
                  or push @errors, "Framework not selected.";
108
                  or push @errors, { code => 'FRAMEWORK_NOT_SELECTED' };
110
            }
109
            }
111
            else {
110
            else {
112
                $framework = $recordObj1->authtype;
111
                $framework = $recordObj1->authtype;
113
            }
112
            }
113
            if ($mergereference eq 'breeding') {
114
                $mergereference = $authid[0];
115
            }
114
116
115
            # Getting MARC Structure
117
            # Getting MARC Structure
116
            my $tagslib = GetTagsLabels( 1, $framework );
118
            my $tagslib = GetTagsLabels( 1, $framework );
Lines 173-178 else { Link Here
173
    }
175
    }
174
}
176
}
175
177
178
my $authtypes = getauthtypes;
179
my @authtypesloop;
180
foreach my $thisauthtype (
181
    sort {
182
        $authtypes->{$a}{'authtypetext'} cmp $authtypes->{$b}{'authtypetext'}
183
    }
184
    keys %$authtypes
185
  )
186
{
187
    my %row = (
188
        value        => $thisauthtype,
189
        authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
190
    );
191
    push @authtypesloop, \%row;
192
}
193
$template->{VARS}->{authtypesloop} = \@authtypesloop;
194
176
if (@errors) {
195
if (@errors) {
177
196
178
    # Errors
197
    # Errors
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt (-1 / +2 lines)
Lines 54-59 function changeFramework(fw) { Link Here
54
54
55
                [% IF error.code == 'CANNOT_MOVE' %]
55
                [% IF error.code == 'CANNOT_MOVE' %]
56
                    The following items could not be moved from the old record to the new one: [% error.value %]
56
                    The following items could not be moved from the old record to the new one: [% error.value %]
57
                [% ELSIF error.code == 'FRAMEWORK_NOT_SELECTED' %]
58
                    No framework has been selected. Please select a framework for merging.
57
                [% ELSE %]
59
                [% ELSE %]
58
                    [% error %]
60
                    [% error %]
59
                [% END %]
61
                [% END %]
60
- 

Return to bug 5202