Merge pull request #7273 from MrPetovan/bug/notices
Fix various notices 2019.06
This commit is contained in:
commit
dc95d7c4f0
|
@ -1463,12 +1463,14 @@ class Contact extends BaseObject
|
||||||
return $contact_id;
|
return $contact_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$updated = ['addr' => $data['addr'],
|
$updated = [
|
||||||
|
'addr' => $data['addr'] ?? '',
|
||||||
'alias' => defaults($data, 'alias', ''),
|
'alias' => defaults($data, 'alias', ''),
|
||||||
'url' => $data['url'],
|
'url' => $data['url'],
|
||||||
'nurl' => Strings::normaliseLink($data['url']),
|
'nurl' => Strings::normaliseLink($data['url']),
|
||||||
'name' => $data['name'],
|
'name' => $data['name'],
|
||||||
'nick' => $data['nick']];
|
'nick' => $data['nick']
|
||||||
|
];
|
||||||
|
|
||||||
if (!empty($data['keywords'])) {
|
if (!empty($data['keywords'])) {
|
||||||
$updated['keywords'] = $data['keywords'];
|
$updated['keywords'] = $data['keywords'];
|
||||||
|
@ -1502,7 +1504,7 @@ class Contact extends BaseObject
|
||||||
$updated['pubkey'] = $data['pubkey'];
|
$updated['pubkey'] = $data['pubkey'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($data['addr'] != $contact['addr']) || (!empty($data['alias']) && ($data['alias'] != $contact['alias']))) {
|
if (($updated['addr'] != $contact['addr']) || (!empty($data['alias']) && ($data['alias'] != $contact['alias']))) {
|
||||||
$updated['uri-date'] = DateTimeFormat::utcNow();
|
$updated['uri-date'] = DateTimeFormat::utcNow();
|
||||||
}
|
}
|
||||||
if (($data["name"] != $contact["name"]) || ($data["nick"] != $contact["nick"])) {
|
if (($data["name"] != $contact["name"]) || ($data["nick"] != $contact["nick"])) {
|
||||||
|
|
|
@ -88,7 +88,7 @@ class Federation extends BaseAdminModule
|
||||||
} while (!empty($parts) && ((strlen($part) >= 40) || (strlen($part) <= 3)));
|
} while (!empty($parts) && ((strlen($part) >= 40) || (strlen($part) <= 3)));
|
||||||
// only take the x.x.x part of the version, not the "release" after the dash
|
// only take the x.x.x part of the version, not the "release" after the dash
|
||||||
if (!empty($part) && strpos($part, '-')) {
|
if (!empty($part) && strpos($part, '-')) {
|
||||||
$part = array_shift(explode('-', $part));
|
$part = explode('-', $part)[0];
|
||||||
}
|
}
|
||||||
if (!empty($part)) {
|
if (!empty($part)) {
|
||||||
if (empty($compacted[$part])) {
|
if (empty($compacted[$part])) {
|
||||||
|
|
|
@ -3543,7 +3543,7 @@ class Diaspora
|
||||||
$public = ($item["private"] ? "false" : "true");
|
$public = ($item["private"] ? "false" : "true");
|
||||||
|
|
||||||
$created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
|
$created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
|
||||||
$edited = DateTimeFormat::utc($item["edited"], DateTimeFormat::ATOM);
|
$edited = DateTimeFormat::utc($item["edited"] ?? $item["created"], DateTimeFormat::ATOM);
|
||||||
|
|
||||||
// Detect a share element and do a reshare
|
// Detect a share element and do a reshare
|
||||||
if (!$item['private'] && ($ret = self::isReshare($item["body"]))) {
|
if (!$item['private'] && ($ret = self::isReshare($item["body"]))) {
|
||||||
|
|
Loading…
Reference in a new issue