Added logging and one more reason for a notice found (#5538)
* Added logging and one more reason for a notice found * And one more
This commit is contained in:
parent
9d0f18c0b3
commit
1afc0ab028
3 changed files with 14 additions and 8 deletions
|
@ -944,6 +944,11 @@ class Probe
|
||||||
$prof_data["fn"] = $data["name"];
|
$prof_data["fn"] = $data["name"];
|
||||||
$prof_data["key"] = $data["pubkey"];
|
$prof_data["key"] = $data["pubkey"];
|
||||||
|
|
||||||
|
// This logging is for temporarily debugging reasons
|
||||||
|
if (!isset($data["poco"])) {
|
||||||
|
logger('POCO not defined for ' . profile_link, LOGGER_DEBUG);
|
||||||
|
}
|
||||||
|
|
||||||
logger("Result for profile ".$profile_link.": ".print_r($prof_data, true), LOGGER_DEBUG);
|
logger("Result for profile ".$profile_link.": ".print_r($prof_data, true), LOGGER_DEBUG);
|
||||||
|
|
||||||
return $prof_data;
|
return $prof_data;
|
||||||
|
|
|
@ -1374,15 +1374,12 @@ class Diaspora
|
||||||
$item = Item::selectFirst($fields, $condition);
|
$item = Item::selectFirst($fields, $condition);
|
||||||
|
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
if (!isset($contact["url"])) {
|
|
||||||
logger('Missing URL: ' . System::callstack() . ' - ' . json_encode($contact));
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = self::storeByGuid($guid, $contact["url"], $uid);
|
|
||||||
|
|
||||||
if (!$result) {
|
|
||||||
$person = self::personByHandle($author);
|
$person = self::personByHandle($author);
|
||||||
$result = self::storeByGuid($guid, $person["url"], $uid);
|
$result = self::storeByGuid($guid, $person["url"], $uid);
|
||||||
|
|
||||||
|
// We don't have an url for items that arrived at the public dispatcher
|
||||||
|
if (!$result && !empty($contact["url"])) {
|
||||||
|
$result = self::storeByGuid($guid, $contact["url"], $uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
|
|
|
@ -659,6 +659,10 @@ class PortableContact
|
||||||
$nodeinfo2_url = '';
|
$nodeinfo2_url = '';
|
||||||
|
|
||||||
foreach ($nodeinfo['links'] as $link) {
|
foreach ($nodeinfo['links'] as $link) {
|
||||||
|
if (!is_array($link) || empty($link['rel'])) {
|
||||||
|
logger('Invalid nodeinfo format for ' . $server_url, LOGGER_DEBUG);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($link['rel'] == 'http://nodeinfo.diaspora.software/ns/schema/1.0') {
|
if ($link['rel'] == 'http://nodeinfo.diaspora.software/ns/schema/1.0') {
|
||||||
$nodeinfo1_url = $link['href'];
|
$nodeinfo1_url = $link['href'];
|
||||||
} elseif ($link['rel'] == 'http://nodeinfo.diaspora.software/ns/schema/2.0') {
|
} elseif ($link['rel'] == 'http://nodeinfo.diaspora.software/ns/schema/2.0') {
|
||||||
|
|
Loading…
Reference in a new issue