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

(-)a/C4/NewsChannels.pm (-4 / +4 lines)
Lines 226-238 sub GetNewsToDisplay { Link Here
226
        OR    expirationdate IS NULL
226
        OR    expirationdate IS NULL
227
     )
227
     )
228
     AND   published_on <= CURDATE()
228
     AND   published_on <= CURDATE()
229
     AND   (opac_news.lang = '' OR opac_news.lang = ?)
229
     AND   (opac_news.lang = ? OR opac_news.lang = ?)
230
     AND   (opac_news.branchcode IS NULL OR opac_news.branchcode = ?)
230
     AND   (opac_news.branchcode IS NULL OR opac_news.branchcode = ?)
231
     ORDER BY number
231
     ORDER BY number
232
    };
232
    };
233
    my $sth = $dbh->prepare($query);
233
    my $sth = $dbh->prepare($query);
234
    $lang = $lang // q{};
234
    my $lang1 = ( $lang =~ /_/ ) ? $lang : q{}; # lang contains also location
235
    $sth->execute($lang,$branch);
235
    my $lang2 = $lang // q{};
236
    $sth->execute($lang1,$lang2,$branch);
236
    my @results;
237
    my @results;
237
    while ( my $row = $sth->fetchrow_hashref ){
238
    while ( my $row = $sth->fetchrow_hashref ){
238
        $row->{newdate} = output_pref({ dt => dt_from_string( $row->{newdate} ), dateonly => 1 });
239
        $row->{newdate} = output_pref({ dt => dt_from_string( $row->{newdate} ), dateonly => 1 });
239
- 

Return to bug 28698