if (isset($parts["path"]))
$new_url .= $parts["path"];
+ if ($new_url != $url)
+ logger("Cleaned contact url ".$url." to ".$new_url." - Called by: ".App::callstack(), LOGGER_DEBUG);
+
return $new_url;
}
if (($contact["network"] == NETWORK_OSTATUS) AND poco_alternate_ostatus_url($contact["url"])) {
$data = probe_url($contact["url"]);
if ($contact["network"] == NETWORK_OSTATUS) {
- logger("Fix primary url from ".$contact["url"]." to ".$data["url"], LOGGER_DEBUG);
+ logger("Fix primary url from ".$contact["url"]." to ".$data["url"]." - Called by: ".App::callstack(), LOGGER_DEBUG);
$contact["url"] = $data["url"];
$contact["addr"] = $data["addr"];
$contact["alias"] = $data["alias"];
$gcontact_id = 0;
- if (in_array($contact["network"], array(NETWORK_FEED, NETWORK_PHANTOM)))
+ if (in_array($contact["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) {
+ logger("Invalid network for contact url ".$contact["url"]." - Called by: ".App::callstack(), LOGGER_DEBUG);
return false;
+ }
if ($contact["network"] == NETWORK_STATUSNET)
$contact["network"] = NETWORK_OSTATUS;
function update_gcontact_from_probe($url) {
$data = probe_url($url);
- if (in_array($data["network"], array(NETWORK_FEED, NETWORK_PHANTOM)))
+ if (in_array($data["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) {
+ logger("Invalid network for contact url ".$data["url"]." - Called by: ".App::callstack(), LOGGER_DEBUG);
return;
+ }
update_gcontact($data);
}