]> git.wh0rd.org Git - tt-rss.git/commitdiff
properly handle OR clauses in labels when generating headlines list (closes #220)
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 18 Sep 2008 03:20:11 +0000 (04:20 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 18 Sep 2008 03:20:11 +0000 (04:20 +0100)
functions.php

index 777ec32c985f619f94cdbde68674502857556900..2c8309003368deffde42e2e16bd2ec0561a307fc 100644 (file)
                                $tmp_result = db_query($link, "SELECT sql_exp FROM ttrss_labels
                                        WHERE id = '$label_id'");
                        
-                               $query_strategy_part = db_fetch_result($tmp_result, 0, "sql_exp");
+                               $query_strategy_part = "(" . db_fetch_result($tmp_result, 0, "sql_exp") . ")";
 
                                if (!$query_strategy_part) {
                                        return false;
                                        $view_query_part
                                        $query_strategy_part ORDER BY $order_by
                                        $limit_query_part $offset_query_part";
-                                       
-                               $result = db_query($link, $query);
-       
+
                                if ($_GET["debug"]) print $query;
+
+                               $result = db_query($link, $query);
        
                        } else {
                                // browsing by tag