Add feedback :-)

This commit is contained in:
Philipp 2021-09-15 00:31:33 +02:00
parent 89a085a12c
commit 462f76352e
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
4 changed files with 16 additions and 10 deletions

View file

@ -2759,7 +2759,7 @@ class Contact
public static function removeFollower(array $contact)
{
if (!empty($contact['rel']) && (($contact['rel'] == self::FRIEND) || ($contact['rel'] == self::SHARING))) {
if (in_array($contact['rel'] ?? [], [self::FRIEND, self::SHARING])) {
DBA::update('contact', ['rel' => self::SHARING], ['id' => $contact['id']]);
} elseif (!empty($contact['id'])) {
self::remove($contact['id']);

View file

@ -2259,7 +2259,7 @@ class Item
$condition[0] .= " AND `received` < UTC_TIMESTAMP() - INTERVAL ? DAY";
$condition[] = $days;
$items = Post::select(['resource-id', 'starred', 'id', 'post-type', 'uid', 'uri-id'], $condition);
$items = Post::select(['resource-id', 'starred', 'id', 'post-type', 'uid', 'uri-id', 'post-type'], $condition);
if (!DBA::isResult($items)) {
return;
@ -2292,9 +2292,9 @@ class Item
continue;
} elseif (!$expire_starred && intval($item['starred'])) {
continue;
} elseif (!$expire_notes && (($item['post-type'] ?? null) == self::PT_PERSONAL_NOTE)) {
} elseif (!$expire_notes && ($item['post-type'] == self::PT_PERSONAL_NOTE)) {
continue;
} elseif (!$expire_items && (($item['post-type'] ?? null) != self::PT_PERSONAL_NOTE)) {
} elseif (!$expire_items && ($item['post-type'] != self::PT_PERSONAL_NOTE)) {
continue;
}