From 2b2d9583cd2a4dc39c6f95dd73866c009f4480ce Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 2 Mar 2019 20:39:18 +0100 Subject: Fix mark_updated_article_unread https://github.com/FreshRSS/FreshRSS/issues/2200 --- app/Controllers/feedController.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/Controllers') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 74c9eacfa..42cb46834 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -353,11 +353,10 @@ class FreshRSS_feed_Controller extends Minz_ActionController { } else { //This entry already exists but has been updated //Minz_Log::debug('Entry with GUID `' . $entry->guid() . '` updated in feed ' . $feed->url(false) . //', old hash ' . $existingHash . ', new hash ' . $entry->hash()); - $mark_updated_article_unread = $feed->attributes('mark_updated_article_unread') !== null ? ( - $feed->attributes('mark_updated_article_unread') - ) : FreshRSS_Context::$user_conf->mark_updated_article_unread; + $mark_updated_article_unread = $feed->attributes('mark_updated_article_unread') !== null ? + $feed->attributes('mark_updated_article_unread') : FreshRSS_Context::$user_conf->mark_updated_article_unread; $needFeedCacheRefresh = $mark_updated_article_unread; - $entry->_isRead(FreshRSS_Context::$user_conf->mark_updated_article_unread ? false : null); //Change is_read according to policy. + $entry->_isRead($mark_updated_article_unread ? false : null); //Change is_read according to policy. $entry = Minz_ExtensionManager::callHook('entry_before_insert', $entry); if ($entry === null) { -- cgit v1.2.3 From f1978da394eb6e400d9aa58faf5322129ad635ce Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 2 Mar 2019 20:43:51 +0100 Subject: Boolean error --- app/Controllers/feedController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Controllers') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 42cb46834..179a8971e 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -356,7 +356,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $mark_updated_article_unread = $feed->attributes('mark_updated_article_unread') !== null ? $feed->attributes('mark_updated_article_unread') : FreshRSS_Context::$user_conf->mark_updated_article_unread; $needFeedCacheRefresh = $mark_updated_article_unread; - $entry->_isRead($mark_updated_article_unread ? false : null); //Change is_read according to policy. + $entry->_isRead($mark_updated_article_unread ? true : null); //Change is_read according to policy. $entry = Minz_ExtensionManager::callHook('entry_before_insert', $entry); if ($entry === null) { -- cgit v1.2.3 From 7d76acad04f1ac31829611c90a8941104f74b6a4 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 2 Mar 2019 20:56:03 +0100 Subject: Re-introduce Travis workaround --- app/Controllers/feedController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/Controllers') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 179a8971e..57c2e392d 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -353,8 +353,9 @@ class FreshRSS_feed_Controller extends Minz_ActionController { } else { //This entry already exists but has been updated //Minz_Log::debug('Entry with GUID `' . $entry->guid() . '` updated in feed ' . $feed->url(false) . //', old hash ' . $existingHash . ', new hash ' . $entry->hash()); - $mark_updated_article_unread = $feed->attributes('mark_updated_article_unread') !== null ? - $feed->attributes('mark_updated_article_unread') : FreshRSS_Context::$user_conf->mark_updated_article_unread; + $mark_updated_article_unread = $feed->attributes('mark_updated_article_unread') !== null ? ( + $feed->attributes('mark_updated_article_unread') + ) : FreshRSS_Context::$user_conf->mark_updated_article_unread; $needFeedCacheRefresh = $mark_updated_article_unread; $entry->_isRead($mark_updated_article_unread ? true : null); //Change is_read according to policy. -- cgit v1.2.3 From 2856f7b8b47abcddf20589e19be1f5b98caa1ae3 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 2 Mar 2019 21:06:56 +0100 Subject: Revert wrong boolean --- app/Controllers/feedController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Controllers') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 57c2e392d..d5ae235ad 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -357,7 +357,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $feed->attributes('mark_updated_article_unread') ) : FreshRSS_Context::$user_conf->mark_updated_article_unread; $needFeedCacheRefresh = $mark_updated_article_unread; - $entry->_isRead($mark_updated_article_unread ? true : null); //Change is_read according to policy. + $entry->_isRead($mark_updated_article_unread ? false : null); //Change is_read according to policy. $entry = Minz_ExtensionManager::callHook('entry_before_insert', $entry); if ($entry === null) { -- cgit v1.2.3