- moved constants GRAVITY_* from boot.php to Friendica\Model\Item
- also rewrote some array initialization:
From:
````
<?php
$arr = [];
$arr['foo'] = "FOO";
````
To:
````
<?php
$arr['foo'] = "FOO";
````
- added a few type-hints
$condition = ["`uid` = ?", $uid];
}
- $contact_field = ((($contact["contact-type"] == self::TYPE_COMMUNITY) || ($contact['network'] == Protocol::MAIL)) ? 'owner-id' : 'author-id');
+ $contact_field = ((($contact['contact-type'] == self::TYPE_COMMUNITY) || ($contact['network'] == Protocol::MAIL)) ? 'owner-id' : 'author-id');
$condition = DBA::mergeConditions($condition, ["`$contact_field` = ? AND `gravity` IN (?, ?)", $cid, Item::GRAVITY_PARENT, Item::GRAVITY_COMMENT]);
|| ($item['verb'] == Activity::ANNOUNCE)
) {
$item['gravity'] = Item::GRAVITY_ACTIVITY;
+
// only one like or dislike per person
// split into two queries for performance issues
$condition = [