summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot.class.php5
1 files changed, 4 insertions, 1 deletions
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))