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

(-)a/Koha/AdditionalContents.pm (-5 / +4 lines)
Lines 87-95 sub search_for_display { Link Here
87
    my $contents = $self->SUPER::search( $search_params, { order_by => 'number' } );
87
    my $contents = $self->SUPER::search( $search_params, { order_by => 'number' } );
88
    my @all_content_id = $contents->get_column('id');
88
    my @all_content_id = $contents->get_column('id');
89
89
90
    my @translated_content_id;
90
    my ( $translated_contents, @translated_content_id );
91
    if ( $params->{lang} ) {
91
    if ( $params->{lang} && $params->{lang} ne 'default' ) {
92
        my $translated_contents = Koha::AdditionalContentsLocalizations->search(
92
        $translated_contents = Koha::AdditionalContentsLocalizations->search(
93
            {
93
            {
94
                additional_content_id => [$contents->get_column('id')],
94
                additional_content_id => [$contents->get_column('id')],
95
                lang => $params->{lang},
95
                lang => $params->{lang},
Lines 107-113 sub search_for_display { Link Here
107
107
108
    return Koha::AdditionalContentsLocalizations->search(
108
    return Koha::AdditionalContentsLocalizations->search(
109
        {
109
        {
110
            id => [@translated_content_id, $default_contents->get_column('id')]
110
            id => [ $translated_contents ? $translated_contents->get_column('id') : (), $default_contents->get_column('id') ]
111
        },
111
        },
112
    );
112
    );
113
113
114
- 

Return to bug 31383