From ea6cffdd9f04bd855f9b763776d44ae4702a8116 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 27 Mar 2014 13:14:08 +0100 Subject: [PATCH] Bug 7567: QA followup: FIX SQL query The WHERE clause should not erase $query. Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- C4/NewsChannels.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm index 7c413aa815..acefb70e67 100644 --- a/C4/NewsChannels.pm +++ b/C4/NewsChannels.pm @@ -150,7 +150,7 @@ sub get_opac_news { FROM opac_news LEFT JOIN branches ON opac_news.branchcode=branches.branchcode }; - $query = ' WHERE 1'; + $query .= ' WHERE 1'; if ($lang) { $query .= " AND (opac_news.lang='' OR opac_news.lang=?)"; push @values,$lang; -- 2.39.5