From afa1a260d0c47ddb44225786fb3ed892a0a0b428 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 26 Jun 2013 02:17:49 +0400 Subject: fix inverse status not being set correctly for filters when creating them fix inverse rules not being saved/restored properly through opml --- classes/opml.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'classes/opml.php') 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) { -- cgit v1.2.3-54-g00ecf From 6b74f725a3beb9fb2340a4eeb1fe4b0c0dc8caeb Mon Sep 17 00:00:00 2001 From: Jordi De Groof Date: Fri, 16 Aug 2013 19:10:43 +0200 Subject: Add type="rss" on subscription list nodes See http://feedvalidator.org/docs/warning/MissingOutlineType.html --- classes/opml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/opml.php') diff --git a/classes/opml.php b/classes/opml.php index e9a07bb52..0a64272a3 100644 --- a/classes/opml.php +++ b/classes/opml.php @@ -97,7 +97,7 @@ class Opml extends Handler_Protected { $html_url_qpart = ""; } - $out .= "\n"; + $out .= "\n"; } if ($cat_title) $out .= "\n"; -- cgit v1.2.3-54-g00ecf From 631c06760190b7e207a8a16bb76517f7f308dc68 Mon Sep 17 00:00:00 2001 From: Jordi De Groof Date: Fri, 16 Aug 2013 19:19:36 +0200 Subject: Include both title and text attributes See http://feedvalidator.org/docs/warning/MissingTitleAttr.html --- classes/opml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/opml.php') diff --git a/classes/opml.php b/classes/opml.php index 0a64272a3..cac82f15d 100644 --- a/classes/opml.php +++ b/classes/opml.php @@ -97,7 +97,7 @@ class Opml extends Handler_Protected { $html_url_qpart = ""; } - $out .= "\n"; + $out .= "\n"; } if ($cat_title) $out .= "\n"; -- cgit v1.2.3-54-g00ecf From 7bdc1df12146e7c43875f8099a3ef016b7db8844 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 29 Aug 2013 16:30:01 +0400 Subject: Revert "Include both title and text attributes" This reverts commit 631c06760190b7e207a8a16bb76517f7f308dc68. --- classes/opml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/opml.php') diff --git a/classes/opml.php b/classes/opml.php index cac82f15d..0a64272a3 100644 --- a/classes/opml.php +++ b/classes/opml.php @@ -97,7 +97,7 @@ class Opml extends Handler_Protected { $html_url_qpart = ""; } - $out .= "\n"; + $out .= "\n"; } if ($cat_title) $out .= "\n"; -- cgit v1.2.3-54-g00ecf From 6bb051285e919d04a1078309ed4918696d2ab63b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 26 Feb 2014 09:02:42 +0400 Subject: opml import: remove unneeded 250 character restriction on feed urls --- classes/opml.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes/opml.php') diff --git a/classes/opml.php b/classes/opml.php index 0a64272a3..c8c59e8a2 100644 --- a/classes/opml.php +++ b/classes/opml.php @@ -257,8 +257,8 @@ class Opml extends Handler_Protected { $feed_title = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('text')->nodeValue, 0, 250)); if (!$feed_title) $feed_title = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('title')->nodeValue, 0, 250)); - $feed_url = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('xmlUrl')->nodeValue, 0, 250)); - if (!$feed_url) $feed_url = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('xmlURL')->nodeValue, 0, 250)); + $feed_url = $this->dbh->escape_string($attrs->getNamedItem('xmlUrl')->nodeValue); + if (!$feed_url) $feed_url = $this->dbh->escape_string($attrs->getNamedItem('xmlURL')->nodeValue); $site_url = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('htmlUrl')->nodeValue, 0, 250)); -- cgit v1.2.3-54-g00ecf