summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-09-18 04:20:11 +0100
committerAndrew Dolgov <[email protected]>2008-09-18 04:20:11 +0100
commit4bc311fcb7de30d385f2a88d1232a485666d9b29 (patch)
treea2c58589e6a9bdecc31e6ea8633f4f328f9895d2 /functions.php
parent5ffd798ddef191613029d02b273301e9d6bb9d26 (diff)
properly handle OR clauses in labels when generating headlines list (closes #220)
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/functions.php b/functions.php
index 777ec32c9..2c8309003 100644
--- a/functions.php
+++ b/functions.php
@@ -3253,7 +3253,7 @@
$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;
@@ -3392,10 +3392,10 @@
$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