fix cat_filter parsed wrong on psql
This commit is contained in:
parent
491b3c9add
commit
5451903ce3
2 changed files with 5 additions and 2 deletions
|
@ -182,7 +182,7 @@ class Pref_Filters extends Handler_Protected {
|
||||||
WHERE filter_id = '$filter_id' ORDER BY id");
|
WHERE filter_id = '$filter_id' ORDER BY id");
|
||||||
|
|
||||||
while ($line = db_fetch_assoc($rules_result)) {
|
while ($line = db_fetch_assoc($rules_result)) {
|
||||||
if ($line["cat_filter"]) {
|
if (sql_bool_to_bool($line["cat_filter"])) {
|
||||||
unset($line["cat_filter"]);
|
unset($line["cat_filter"]);
|
||||||
$line["feed_id"] = "CAT:" . (int)$line["cat_id"];
|
$line["feed_id"] = "CAT:" . (int)$line["cat_id"];
|
||||||
unset($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"]));
|
$feed_id = db_escape_string(trim($rule["feed_id"]));
|
||||||
|
|
||||||
if (strpos($feed_id, "CAT:") === 0) {
|
if (strpos($feed_id, "CAT:") === 0) {
|
||||||
|
|
||||||
$cat_filter = bool_to_sql_bool(true);
|
$cat_filter = bool_to_sql_bool(true);
|
||||||
$cat_id = (int) substr($feed_id, 4);
|
$cat_id = (int) substr($feed_id, 4);
|
||||||
$feed_id = "NULL";
|
$feed_id = "NULL";
|
||||||
|
@ -806,7 +807,7 @@ class Pref_Filters extends Handler_Protected {
|
||||||
|
|
||||||
while ($line = db_fetch_assoc($result)) {
|
while ($line = db_fetch_assoc($result)) {
|
||||||
|
|
||||||
if ($line["cat_filter"]) {
|
if (sql_bool_to_bool($line["cat_filter"])) {
|
||||||
unset($line["cat_filter"]);
|
unset($line["cat_filter"]);
|
||||||
$line["feed_id"] = "CAT:" . (int)$line["cat_id"];
|
$line["feed_id"] = "CAT:" . (int)$line["cat_id"];
|
||||||
unset($line["cat_id"]);
|
unset($line["cat_id"]);
|
||||||
|
|
|
@ -277,6 +277,8 @@
|
||||||
|
|
||||||
// Oh god it's full of hacks
|
// Oh god it's full of hacks
|
||||||
|
|
||||||
|
## print_r($filter);
|
||||||
|
|
||||||
$_REQUEST = $filter;
|
$_REQUEST = $filter;
|
||||||
$_SESSION["uid"] = $owner_uid;
|
$_SESSION["uid"] = $owner_uid;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue