]> git.mxchange.org Git - friendica.git/commitdiff
Poll twice a day when there had been posts in the last 7 days
authorMichael <heluecht@pirati.ca>
Mon, 17 Aug 2020 09:53:49 +0000 (09:53 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 17 Aug 2020 09:53:49 +0000 (09:53 +0000)
src/Protocol/Feed.php

index 917352793bd8dd259f42c880bbc7d32bcee99bba..8a6725d19a46bc6dc84d762ea823ea1e03cd9d67 100644 (file)
@@ -672,7 +672,7 @@ class Feed
 
                        if (empty($priority)) {
                                // Calculate the highest "posts per day" value
-                               $max = 1;
+                               $max = 0;
                                foreach ($frequency as $entry) {
                                        if (($entry['count'] == 1) || ($entry['high'] == $entry['low'])) {
                                                continue;
@@ -700,7 +700,7 @@ class Feed
                                        $priority = 5; // Poll every three hours
                                } elseif ($max > 2) {
                                        $priority = 6; // Poll every six hours
-                               } elseif ($max > 1) {
+                               } elseif ($max > 0) {
                                        $priority = 7; // Poll twice a day
                                } else {
                                        /// @todo In the future we could calculate the days between the posts to set even lower priorities