Merge pull request #7788 from annando/errors
Fix several warnings and errors
This commit is contained in:
commit
ad4485f4ee
3 changed files with 8 additions and 4 deletions
|
@ -841,7 +841,7 @@ class GContact
|
||||||
|
|
||||||
if ($curlResult->isSuccess() && !empty($curlResult->getBody())) {
|
if ($curlResult->isSuccess() && !empty($curlResult->getBody())) {
|
||||||
$noscrape = json_decode($curlResult->getBody(), true);
|
$noscrape = json_decode($curlResult->getBody(), true);
|
||||||
if (!empty($noscrape)) {
|
if (!empty($noscrape) && !empty($noscrape['updated'])) {
|
||||||
$noscrape['updated'] = DateTimeFormat::utc($noscrape['updated'], DateTimeFormat::MYSQL);
|
$noscrape['updated'] = DateTimeFormat::utc($noscrape['updated'], DateTimeFormat::MYSQL);
|
||||||
$fields = ['last_contact' => DateTimeFormat::utcNow(), 'updated' => $noscrape['updated']];
|
$fields = ['last_contact' => DateTimeFormat::utcNow(), 'updated' => $noscrape['updated']];
|
||||||
DBA::update('gcontact', $fields, ['nurl' => Strings::normaliseLink($data['url'])]);
|
DBA::update('gcontact', $fields, ['nurl' => Strings::normaliseLink($data['url'])]);
|
||||||
|
@ -1130,8 +1130,8 @@ class GContact
|
||||||
'birthday' => $userdata['dob'], 'photo' => $userdata['photo'],
|
'birthday' => $userdata['dob'], 'photo' => $userdata['photo'],
|
||||||
"notify" => $userdata['notify'], 'url' => $userdata['url'],
|
"notify" => $userdata['notify'], 'url' => $userdata['url'],
|
||||||
"hide" => ($userdata['hidewall'] || !$userdata['net-publish']),
|
"hide" => ($userdata['hidewall'] || !$userdata['net-publish']),
|
||||||
'nick' => $userdata['nickname'], 'addr' => $addr,
|
'nick' => $userdata['nickname'], 'addr' => $userdata['addr'],
|
||||||
"connect" => $addr, "server_url" => System::baseUrl(),
|
"connect" => $userdata['addr'], "server_url" => System::baseUrl(),
|
||||||
"generation" => 1, 'network' => Protocol::DFRN];
|
"generation" => 1, 'network' => Protocol::DFRN];
|
||||||
|
|
||||||
self::update($gcontact);
|
self::update($gcontact);
|
||||||
|
|
|
@ -190,7 +190,8 @@ class User
|
||||||
`user`.`page-flags`,
|
`user`.`page-flags`,
|
||||||
`user`.`account-type`,
|
`user`.`account-type`,
|
||||||
`user`.`prvnets`,
|
`user`.`prvnets`,
|
||||||
`user`.`account_removed`
|
`user`.`account_removed`,
|
||||||
|
`user`.`hidewall`
|
||||||
FROM `contact`
|
FROM `contact`
|
||||||
INNER JOIN `user`
|
INNER JOIN `user`
|
||||||
ON `user`.`uid` = `contact`.`uid`
|
ON `user`.`uid` = `contact`.`uid`
|
||||||
|
|
|
@ -152,6 +152,9 @@ class Notifier
|
||||||
$fields = ['network', 'author-id', 'author-link', 'owner-id'];
|
$fields = ['network', 'author-id', 'author-link', 'owner-id'];
|
||||||
$condition = ['uri' => $target_item["thr-parent"], 'uid' => $target_item["uid"]];
|
$condition = ['uri' => $target_item["thr-parent"], 'uid' => $target_item["uid"]];
|
||||||
$thr_parent = Item::selectFirst($fields, $condition);
|
$thr_parent = Item::selectFirst($fields, $condition);
|
||||||
|
if (empty($thr_parent)) {
|
||||||
|
$thr_parent = $parent;
|
||||||
|
}
|
||||||
|
|
||||||
Logger::log('GUID: ' . $target_item["guid"] . ': Parent is ' . $parent['network'] . '. Thread parent is ' . $thr_parent['network'], Logger::DEBUG);
|
Logger::log('GUID: ' . $target_item["guid"] . ': Parent is ' . $parent['network'] . '. Thread parent is ' . $thr_parent['network'], Logger::DEBUG);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue