diff options
| author | Andrew Dolgov <fox@madoka.volgo-balt.ru> | 2012-08-31 12:24:13 +0400 |
|---|---|---|
| committer | Andrew Dolgov <fox@madoka.volgo-balt.ru> | 2012-08-31 12:24:13 +0400 |
| commit | 5451903ce33d21fa4901227a4021d44eb2e20535 (patch) | |
| tree | 86ca1eb53de63603d47b0be3f3d74f6d8e5e7049 /classes/pref | |
| parent | 491b3c9add692bc97adf20d9dac5b2027547115d (diff) | |
fix cat_filter parsed wrong on psql
Diffstat (limited to 'classes/pref')
| -rw-r--r-- | classes/pref/filters.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 591d429eb..f1a4c7fd1 100644 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -182,7 +182,7 @@ class Pref_Filters extends Handler_Protected { WHERE filter_id = '$filter_id' ORDER BY id"); while ($line = db_fetch_assoc($rules_result)) { - if ($line["cat_filter"]) { + if (sql_bool_to_bool($line["cat_filter"])) { unset($line["cat_filter"]); $line["feed_id"] = "CAT:" . (int)$line["cat_id"]; unset($line["cat_id"]); @@ -385,6 +385,7 @@ class Pref_Filters extends Handler_Protected { $feed_id = db_escape_string(trim($rule["feed_id"])); if (strpos($feed_id, "CAT:") === 0) { + $cat_filter = bool_to_sql_bool(true); $cat_id = (int) substr($feed_id, 4); $feed_id = "NULL"; @@ -806,7 +807,7 @@ class Pref_Filters extends Handler_Protected { while ($line = db_fetch_assoc($result)) { - if ($line["cat_filter"]) { + if (sql_bool_to_bool($line["cat_filter"])) { unset($line["cat_filter"]); $line["feed_id"] = "CAT:" . (int)$line["cat_id"]; unset($line["cat_id"]); |