From: Andreas Unterkircher Date: Sun, 6 Jan 2008 16:52:37 +0000 (+0100) Subject: used AND to add a show_tag constrait, but in case there hasn't been issued X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=commitdiff_plain;h=7d8b71f32de8ec781aff4641a9904a10e59828ff used AND to add a show_tag constrait, but in case there hasn't been issued a WHERE query already a WHERE needs to be used instead of the AND Signed-off-by: Arun Persaud Signed-off-by: Andreas Unterkircher --- diff --git a/phpfspot.class.php b/phpfspot.class.php index cbb6fed..03fe9d4 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -877,7 +877,10 @@ class PHPFSPOT { $query_str.= "WHERE ". $additional_where_cond ." "; if(isset($this->cfg->show_tags) && !empty($this->cfg->show_tags)) { - $query_str.= "AND t.name IN ('".implode("','",$this->cfg->show_tags). "')"; + if(isset($additional_where_cond)) + $query_str.= "AND t.name IN ('".implode("','",$this->cfg->show_tags). "')"; + else + $query_str.= "WHERE t.name IN ('".implode("','",$this->cfg->show_tags). "')"; } if(isset($order_str))