summaryrefslogtreecommitdiff
path: root/classes/opml.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-06-05 13:09:47 +0400
committerAndrew Dolgov <[email protected]>2013-06-05 13:09:47 +0400
commita1495542fcbe85e5dbe84d4eea26a8364924e2f0 (patch)
treebe8f93531581fca92df8c18c7f77aea4532f2ef6 /classes/opml.php
parent25051fb84ba324b49f173d8210c1883b9618a9d7 (diff)
opml: fix filter parameters inverse and title not being properly imported from OPML
Diffstat (limited to 'classes/opml.php')
-rw-r--r--classes/opml.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/classes/opml.php b/classes/opml.php
index b37b72c21..c5d14cdde 100644
--- a/classes/opml.php
+++ b/classes/opml.php
@@ -165,7 +165,7 @@ class Opml extends Handler_Protected {
WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY id");
while ($line = $this->dbh->fetch_assoc($result)) {
- foreach (array('enabled', 'match_any_rule') as $b) {
+ foreach (array('enabled', 'match_any_rule', 'inverse') as $b) {
$line[$b] = sql_bool_to_bool($line[$b]);
}
@@ -325,11 +325,14 @@ class Opml extends Handler_Protected {
if ($filter) {
$match_any_rule = bool_to_sql_bool($filter["match_any_rule"]);
$enabled = bool_to_sql_bool($filter["enabled"]);
+ $inverse = bool_to_sql_bool($filter["inverse"]);
+ $title = db_escape_string($filter["title"]);
$this->dbh->query("BEGIN");
- $this->dbh->query("INSERT INTO ttrss_filters2 (match_any_rule,enabled,owner_uid)
- VALUES ($match_any_rule, $enabled,".$_SESSION["uid"].")");
+ $this->dbh->query("INSERT INTO ttrss_filters2 (match_any_rule,enabled,inverse,title,owner_uid)
+ VALUES ($match_any_rule, $enabled, $inverse, '$title',
+ ".$_SESSION["uid"].")");
$result = $this->dbh->query("SELECT MAX(id) AS id FROM ttrss_filters2 WHERE
owner_uid = ".$_SESSION["uid"]);