+ $count = 0;
+ while ($gserver = DBA::fetch($gservers)) {
+ // Sometimes the "nurl" and "url" doesn't seem to fit, see https://forum.friendi.ca/display/ec054ce7-155f-c94d-6159-f50372664245
+ // There are duplicated "url" but not "nurl". So we check both addresses instead of just overwriting them,
+ // since that would mean loosing data.
+ if (!empty($gserver['url'])) {
+ if (Worker::add(PRIORITY_LOW, 'UpdateGServer', $gserver['url'])) {
+ $count++;
+ }
+ }
+ if (!empty($gserver['nurl']) && ($gserver['nurl'] != Strings::normaliseLink($gserver['url']))) {
+ if (Worker::add(PRIORITY_LOW, 'UpdateGServer', $gserver['nurl'])) {
+ $count++;
+ }