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

(-)a/Koha/AuthorisedValues.pm (-1 / +1 lines)
Lines 63-69 sub search { Link Here
63
      ->search( { %$params, %$or, }, $join );
63
      ->search( { %$params, %$or, }, $join );
64
64
65
    my $class = ref($self);
65
    my $class = ref($self);
66
    return wantarray ? $self->_wrap( $rs->all() ) : $class->new_from_dbic($rs);
66
    return wantarray ? $self->_wrap( $rs->all() ) : $class->_new_from_dbic($rs);
67
}
67
}
68
68
69
sub categories {
69
sub categories {
(-)a/admin/authorised_values.pl (-4 / +5 lines)
Lines 101-107 if ($op eq 'add_form') { Link Here
101
    my $imageurl     = $input->param( 'imageurl' ) || '';
101
    my $imageurl     = $input->param( 'imageurl' ) || '';
102
    $imageurl = '' if $imageurl =~ /removeImage/;
102
    $imageurl = '' if $imageurl =~ /removeImage/;
103
    my $duplicate_entry = 0;
103
    my $duplicate_entry = 0;
104
    my @branches = $input->param('branches');
104
    my @branches = grep { $_ ne q{} } $input->param('branches');
105
105
106
    if ( $id ) { # Update
106
    if ( $id ) { # Update
107
        my $av = Koha::AuthorisedValues->new->find( $id );
107
        my $av = Koha::AuthorisedValues->new->find( $id );
Lines 113-119 if ($op eq 'add_form') { Link Here
113
        $av->imageurl( $imageurl );
113
        $av->imageurl( $imageurl );
114
        eval{
114
        eval{
115
            $av->store;
115
            $av->store;
116
            $av->branch_limitations( \@branches );
116
            $av->replace_branch_limitations( \@branches );
117
        };
117
        };
118
        if ( $@ ) {
118
        if ( $@ ) {
119
            push @messages, {type => 'error', code => 'error_on_update' };
119
            push @messages, {type => 'error', code => 'error_on_update' };
Lines 129-138 if ($op eq 'add_form') { Link Here
129
            lib_opac => $input->param('lib_opac') || undef,
129
            lib_opac => $input->param('lib_opac') || undef,
130
            imageurl => $imageurl,
130
            imageurl => $imageurl,
131
        } );
131
        } );
132
132
        eval {
133
        eval {
133
            $av->store;
134
            $av->store;
134
            $av->branch_limitations( \@branches );
135
            $av->replace_branch_limitations( \@branches );
135
        };
136
        };
137
136
        if ( $@ ) {
138
        if ( $@ ) {
137
            push @messages, {type => 'error', code => 'error_on_insert' };
139
            push @messages, {type => 'error', code => 'error_on_insert' };
138
        } else {
140
        } else {
139
- 

Return to bug 10363