+ logger("Fetch all global contacts from the server ".$server["nurl"], LOGGER_DEBUG);
+ $success = poco_discover_server(json_decode($retdata["body"]));
+ }
+
+ if (!$success AND (get_config('system','poco_discovery') > 2)) {
+ logger("Fetch contacts from users of the server ".$server["nurl"], LOGGER_DEBUG);
+ poco_discover_server_users($data, $server);
+ }
+ }
+
+ q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"]));