Lines 85-93
sub search_for_display {
Link Here
|
85 |
my $contents = $self->SUPER::search( $search_params, { order_by => 'number' } ); |
85 |
my $contents = $self->SUPER::search( $search_params, { order_by => 'number' } ); |
86 |
my @all_content_id = $contents->get_column('id'); |
86 |
my @all_content_id = $contents->get_column('id'); |
87 |
|
87 |
|
88 |
my @translated_content_id; |
88 |
my ( $translated_contents, @translated_content_id ); |
89 |
if ( $params->{lang} ) { |
89 |
if ( $params->{lang} && $params->{lang} ne 'default' ) { |
90 |
my $translated_contents = Koha::AdditionalContentsLocalizations->search( |
90 |
$translated_contents = Koha::AdditionalContentsLocalizations->search( |
91 |
{ |
91 |
{ |
92 |
additional_content_id => [$contents->get_column('id')], |
92 |
additional_content_id => [$contents->get_column('id')], |
93 |
lang => $params->{lang}, |
93 |
lang => $params->{lang}, |
Lines 105-111
sub search_for_display {
Link Here
|
105 |
|
105 |
|
106 |
return Koha::AdditionalContentsLocalizations->search( |
106 |
return Koha::AdditionalContentsLocalizations->search( |
107 |
{ |
107 |
{ |
108 |
id => [@translated_content_id, $default_contents->get_column('id')] |
108 |
id => [ $translated_contents ? $translated_contents->get_column('id') : (), $default_contents->get_column('id') ] |
109 |
}, |
109 |
}, |
110 |
); |
110 |
); |
111 |
|
111 |
|
112 |
- |
|
|