Merge pull request #7791 from annando/more-warnings
Some more warnings removed
This commit is contained in:
commit
bc18cde412
|
@ -809,14 +809,11 @@ class GContact
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// When the profile doesn't have got a feed, then we exit here
|
if (!empty($data['outbox'])) {
|
||||||
if (empty($data['poll'])) {
|
self::updateFromOutbox($data['outbox'], $data);
|
||||||
return;
|
} elseif (!empty($data['poll']) && ($data['network'] == Protocol::ACTIVITYPUB)) {
|
||||||
}
|
|
||||||
|
|
||||||
if ($data['network'] == Protocol::ACTIVITYPUB) {
|
|
||||||
self::updateFromOutbox($data['poll'], $data);
|
self::updateFromOutbox($data['poll'], $data);
|
||||||
} else {
|
} elseif (!empty($data['poll'])) {
|
||||||
self::updateFromFeed($data);
|
self::updateFromFeed($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -885,10 +882,17 @@ class GContact
|
||||||
}
|
}
|
||||||
|
|
||||||
$last_updated = '';
|
$last_updated = '';
|
||||||
|
|
||||||
foreach ($items as $activity) {
|
foreach ($items as $activity) {
|
||||||
if ($last_updated < $activity['published']) {
|
if (!empty($activity['published'])) {
|
||||||
$last_updated = $activity['published'];
|
$published = DateTimeFormat::utc($activity['published']);
|
||||||
|
} elseif (!empty($activity['object']['published'])) {
|
||||||
|
$published = DateTimeFormat::utc($activity['object']['published']);
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($last_updated < $published) {
|
||||||
|
$last_updated = $published;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ class Diaspora
|
||||||
* @return array with the contact
|
* @return array with the contact
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function getRelayContact(string $server_url, array $fields = ['batch', 'id', 'name', 'network', 'protocol', 'archive', 'blocked'])
|
private static function getRelayContact(string $server_url, array $fields = ['batch', 'id', 'url', 'name', 'network', 'protocol', 'archive', 'blocked'])
|
||||||
{
|
{
|
||||||
// Fetch the relay contact
|
// Fetch the relay contact
|
||||||
$condition = ['uid' => 0, 'nurl' => Strings::normaliseLink($server_url),
|
$condition = ['uid' => 0, 'nurl' => Strings::normaliseLink($server_url),
|
||||||
|
@ -250,7 +250,7 @@ class Diaspora
|
||||||
*/
|
*/
|
||||||
public static function participantsForThread($thread, array $contacts)
|
public static function participantsForThread($thread, array $contacts)
|
||||||
{
|
{
|
||||||
$r = DBA::p("SELECT `contact`.`batch`, `contact`.`id`, `contact`.`name`, `contact`.`network`, `contact`.`protocol`,
|
$r = DBA::p("SELECT `contact`.`batch`, `contact`.`id`, `contact`.`url`, `contact`.`name`, `contact`.`network`, `contact`.`protocol`,
|
||||||
`fcontact`.`batch` AS `fbatch`, `fcontact`.`network` AS `fnetwork` FROM `participation`
|
`fcontact`.`batch` AS `fbatch`, `fcontact`.`network` AS `fnetwork` FROM `participation`
|
||||||
INNER JOIN `contact` ON `contact`.`id` = `participation`.`cid`
|
INNER JOIN `contact` ON `contact`.`id` = `participation`.`cid`
|
||||||
INNER JOIN `fcontact` ON `fcontact`.`id` = `participation`.`fid`
|
INNER JOIN `fcontact` ON `fcontact`.`id` = `participation`.`fid`
|
||||||
|
|
|
@ -404,6 +404,7 @@ class Notifier
|
||||||
"SELECT
|
"SELECT
|
||||||
`batch`,
|
`batch`,
|
||||||
ANY_VALUE(`id`) AS `id`,
|
ANY_VALUE(`id`) AS `id`,
|
||||||
|
ANY_VALUE(`url`) AS `url`,
|
||||||
ANY_VALUE(`name`) AS `name`,
|
ANY_VALUE(`name`) AS `name`,
|
||||||
ANY_VALUE(`network`) AS `network`,
|
ANY_VALUE(`network`) AS `network`,
|
||||||
ANY_VALUE(`protocol`) AS `protocol`
|
ANY_VALUE(`protocol`) AS `protocol`
|
||||||
|
|
Loading…
Reference in a new issue