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

(-)a/Koha/Filter/MARC/ExpandCodedFields.pm (-11 / +6 lines)
Lines 114-127 sub _getCodedFields { Link Here
114
    my $cached    = $cache->get_from_cache( $cache_key, { unsafe => 1 } );
114
    my $cached    = $cache->get_from_cache( $cache_key, { unsafe => 1 } );
115
    return $cached if $cached;
115
    return $cached if $cached;
116
116
117
    my $coded_fields = {
117
    my $coded_fields = {};
118
        map {
118
    my @fields = Koha::MarcSubfieldStructures->search(
119
            $_->tagfield => {
120
                $_->tagsubfield => {
121
                    'authorised_value' => $_->authorised_value
122
                }
123
            }
124
        } Koha::MarcSubfieldStructures->search(
125
            {
119
            {
126
                frameworkcode    => $frameworkcode,
120
                frameworkcode    => $frameworkcode,
127
                authorised_value => { '>' => '' }
121
                authorised_value => { '>' => '' }
Lines 130-137 sub _getCodedFields { Link Here
130
                columns  => [ 'tagfield', 'tagsubfield', 'authorised_value' ],
124
                columns  => [ 'tagfield', 'tagsubfield', 'authorised_value' ],
131
                order_by => [ 'tagfield', 'tagsubfield' ]
125
                order_by => [ 'tagfield', 'tagsubfield' ]
132
            }
126
            }
133
        )->as_list
127
        )->as_list;
134
    };
128
    for my $field (@fields) {
129
        $coded_fields->{ $field->tagfield }->{ $field->tagsubfield }->{'authorised_value'} = $field->authorised_value;
130
    }
135
131
136
    $cache->set_in_cache( $cache_key, $coded_fields );
132
    $cache->set_in_cache( $cache_key, $coded_fields );
137
    return $coded_fields;
133
    return $coded_fields;
138
- 

Return to bug 30848