mirror of
https://github.com/friendica/friendica
synced 2025-04-24 14:30:11 +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
|
@ -29,6 +29,7 @@ use Friendica\Core\L10n;
|
|||
use Friendica\Core\Protocol;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Module\BaseNotifications;
|
||||
use Friendica\Navigation\Notifications\Collection\FormattedNotifies;
|
||||
|
@ -363,13 +364,13 @@ class FormattedNotify extends BaseFactory
|
|||
$item['author-avatar'] = $item['contact-avatar'];
|
||||
}
|
||||
|
||||
$item['label'] = (($item['gravity'] == GRAVITY_PARENT) ? 'post' : 'comment');
|
||||
$item['label'] = (($item['gravity'] == Item::GRAVITY_PARENT) ? 'post' : 'comment');
|
||||
$item['link'] = $this->baseUrl->get(true) . '/display/' . $item['parent-guid'];
|
||||
$item['image'] = $item['author-avatar'];
|
||||
$item['url'] = $item['author-link'];
|
||||
$item['when'] = DateTimeFormat::local($item['created'], 'r');
|
||||
$item['ago'] = Temporal::getRelativeDate($item['created']);
|
||||
$item['text'] = (($item['gravity'] == GRAVITY_PARENT)
|
||||
$item['text'] = (($item['gravity'] == Item::GRAVITY_PARENT)
|
||||
? $this->l10n->t("%s created a new post", $item['author-name'])
|
||||
: $this->l10n->t("%s commented on %s's post", $item['author-name'], $item['parent-author-name']));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue