summaryrefslogtreecommitdiff
path: root/classes/opml.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-06-26 02:17:49 +0400
committerAndrew Dolgov <[email protected]>2013-06-26 02:17:49 +0400
commitafa1a260d0c47ddb44225786fb3ed892a0a0b428 (patch)
treed6f799814cdbbe4f5c932b198e9e4431e0e293cf /classes/opml.php
parent44727c79ad0593982b817554412fc5313e36e2fb (diff)
fix inverse status not being set correctly for filters when creating
them fix inverse rules not being saved/restored properly through opml
Diffstat (limited to 'classes/opml.php')
-rw-r--r--classes/opml.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/opml.php b/classes/opml.php
index c5d14cdde..e9a07bb52 100644
--- a/classes/opml.php
+++ b/classes/opml.php
@@ -190,6 +190,7 @@ class Opml extends Handler_Protected {
}
$tmp_line["cat_filter"] = sql_bool_to_bool($tmp_line["cat_filter"]);
+ $tmp_line["inverse"] = sql_bool_to_bool($tmp_line["inverse"]);
unset($tmp_line["feed_id"]);
unset($tmp_line["cat_id"]);
@@ -363,9 +364,10 @@ class Opml extends Handler_Protected {
$cat_filter = bool_to_sql_bool($rule["cat_filter"]);
$reg_exp = $this->dbh->escape_string($rule["reg_exp"]);
$filter_type = (int)$rule["filter_type"];
+ $inverse = bool_to_sql_bool($rule["inverse"]);
- $this->dbh->query("INSERT INTO ttrss_filters2_rules (feed_id,cat_id,filter_id,filter_type,reg_exp,cat_filter)
- VALUES ($feed_id, $cat_id, $filter_id, $filter_type, '$reg_exp', $cat_filter)");
+ $this->dbh->query("INSERT INTO ttrss_filters2_rules (feed_id,cat_id,filter_id,filter_type,reg_exp,cat_filter,inverse)
+ VALUES ($feed_id, $cat_id, $filter_id, $filter_type, '$reg_exp', $cat_filter,$inverse)");
}
foreach ($filter["actions"] as $action) {