mirror of
https://github.com/friendica/friendica
synced 2025-04-29 09:04:24 +02:00
Rewrite:
- 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
This commit is contained in:
parent
e5ae5c7e67
commit
da66730e4f
77 changed files with 547 additions and 513 deletions
|
@ -54,7 +54,7 @@ class HomeTimeline extends BaseApi
|
|||
$start = max(0, ($page - 1) * $count);
|
||||
|
||||
$condition = ["`uid` = ? AND `gravity` IN (?, ?) AND `uri-id` > ?",
|
||||
$uid, GRAVITY_PARENT, GRAVITY_COMMENT, $since_id];
|
||||
$uid, Item::GRAVITY_PARENT, Item::GRAVITY_COMMENT, $since_id];
|
||||
|
||||
if ($max_id > 0) {
|
||||
$condition[0] .= " AND `uri-id` <= ?";
|
||||
|
@ -62,7 +62,7 @@ class HomeTimeline extends BaseApi
|
|||
}
|
||||
if ($exclude_replies) {
|
||||
$condition[0] .= ' AND `gravity` = ?';
|
||||
$condition[] = GRAVITY_PARENT;
|
||||
$condition[] = Item::GRAVITY_PARENT;
|
||||
}
|
||||
if ($conversation_id > 0) {
|
||||
$condition[0] .= " AND `parent-uri-id` = ?";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue