- if (($contact['priority'] >= 0) && !$force) {
- $update = false;
-
- $t = $contact['last-update'];
-
- /*
- * Based on $contact['priority'], should we poll this site now? Or later?
- */
- switch ($contact['priority']) {
- case 5:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 month")) {
- $update = true;
- }
- break;
- case 4:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 week")) {
- $update = true;
- }
- break;
- case 3:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 day")) {
- $update = true;
- }
- break;
- case 2:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 12 hour")) {
- $update = true;
- }
- break;
- case 1:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 hour")) {
- $update = true;
- }
- break;
- case 0:
- default:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + ".$min_poll_interval." minute")) {
- $update = true;
- }
- break;
- }
- if (!$update) {
- continue;
- }
- }
+ if (($contact['network'] == Protocol::FEED) && ($contact['priority'] <= 3)) {
+ $priority = PRIORITY_MEDIUM;
+ } elseif ($contact['archive']) {
+ $priority = PRIORITY_NEGLIGIBLE;
+ } else {
+ $priority = PRIORITY_LOW;
+ }