]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Cron.php
Add additional check for $links in Probe
[friendica.git] / src / Worker / Cron.php
index 7e3bc747cc7dd03d604fd5cda600a2e122ad532c..f7377a6e7199f4eba5995015bbffdac4be4bb974 100644 (file)
@@ -30,9 +30,6 @@ class Cron
                $last = Config::get('system', 'last_cron');
 
                $poll_interval = intval(Config::get('system', 'cron_interval'));
-               if (! $poll_interval) {
-                       $poll_interval = 10;
-               }
 
                if ($last) {
                        $next = $last + ($poll_interval * 60);
@@ -180,9 +177,10 @@ class Cron
                                FROM `user`
                                STRAIGHT_JOIN `contact`
                                ON `contact`.`uid` = `user`.`uid` AND `contact`.`poll` != ''
-                                       AND `contact`.`network` IN ('%s', '%s', '%s', '%s', '%s') $sql_extra
+                                       AND `contact`.`network` IN ('%s', '%s', '%s', '%s', '%s', '%s') $sql_extra
                                        AND NOT `contact`.`self` AND NOT `contact`.`blocked`
                                WHERE NOT `user`.`account_expired` AND NOT `user`.`account_removed` $abandon_sql",
+                       DBA::escape(Protocol::ACTIVITYPUB),
                        DBA::escape(Protocol::DFRN),
                        DBA::escape(Protocol::OSTATUS),
                        DBA::escape(Protocol::DIASPORA),
@@ -216,8 +214,8 @@ class Cron
                                $contact['priority'] = (!is_null($poll_interval) ? intval($poll_interval) : 3);
                        }
 
-                       // Check Diaspora contacts or followers once a week
-                       if (($contact["network"] == Protocol::DIASPORA) || ($contact["rel"] == Contact::FOLLOWER)) {
+                       // Check ActivityPub and Diaspora contacts or followers once a week
+                       if (in_array($contact["network"], [Protocol::ACTIVITYPUB, Protocol::DIASPORA]) || ($contact["rel"] == Contact::FOLLOWER)) {
                                $contact['priority'] = 4;
                        }