mirror of
https://github.com/friendica/friendica
synced 2025-04-26 22:30:18 +00: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
|
@ -23,6 +23,7 @@ namespace Friendica\Object\Api\Mastodon;
|
|||
|
||||
use Friendica\BaseDataTransferObject;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Object\Api\Mastodon\Status\Counts;
|
||||
use Friendica\Object\Api\Mastodon\Status\UserAttributes;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
@ -102,7 +103,7 @@ class Status extends BaseDataTransferObject
|
|||
$this->id = (string)$item['uri-id'];
|
||||
$this->created_at = DateTimeFormat::utc($item['created'], DateTimeFormat::JSON);
|
||||
|
||||
if ($item['gravity'] == GRAVITY_COMMENT) {
|
||||
if ($item['gravity'] == Item::GRAVITY_COMMENT) {
|
||||
$this->in_reply_to_id = (string)$item['thr-parent-id'];
|
||||
$this->in_reply_to_account_id = (string)$item['parent-author-id'];
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ class Status extends BaseDataTransferObject
|
|||
|
||||
$this->created_at = DateTimeFormat::utc($item['created'], DateTimeFormat::API);
|
||||
|
||||
if ($item['gravity'] == GRAVITY_COMMENT) {
|
||||
if ($item['gravity'] == Item::GRAVITY_COMMENT) {
|
||||
$this->in_reply_to_status_id = (int)$item['thr-parent-id'];
|
||||
$this->in_reply_to_status_id_str = (string)$item['thr-parent-id'];
|
||||
$this->in_reply_to_user_id = (int)$item['parent-author-id'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue