]> git.mxchange.org Git - friendica.git/blobdiff - src/Object/Post.php
Remove duplicate profile_uid key in App->profile array
[friendica.git] / src / Object / Post.php
index efaa688199768f51c4f06093ff5e740f77a04da7..d7624205512eed7aab78896efa9a0f8754bdfcef 100644 (file)
@@ -7,9 +7,7 @@ namespace Friendica\Object;
 use Friendica\Content\ContactSelector;
 use Friendica\Content\Feature;
 use Friendica\Core\Addon;
-use Friendica\Core\Config;
 use Friendica\Core\Hook;
-use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
@@ -375,14 +373,14 @@ class Post
 
                $ago = Temporal::getRelativeDate($item['created']);
                $ago_received = Temporal::getRelativeDate($item['received']);
-               if (Config::get('system', 'show_received') && (abs(strtotime($item['created']) - strtotime($item['received'])) > Config::get('system', 'show_received_seconds')) && ($ago != $ago_received)) {
+               if (DI::config()->get('system', 'show_received') && (abs(strtotime($item['created']) - strtotime($item['received'])) > DI::config()->get('system', 'show_received_seconds')) && ($ago != $ago_received)) {
                        $ago = DI::l10n()->t('%s (Received %s)', $ago, $ago_received);
                }
 
                $tmp_item = [
                        'template'        => $this->getTemplate(),
                        'type'            => implode("", array_slice(explode("/", $item['verb']), -1)),
-                       'suppress_tags'   => Config::get('system', 'suppress_tags'),
+                       'suppress_tags'   => DI::config()->get('system', 'suppress_tags'),
                        'tags'            => $tags['tags'],
                        'hashtags'        => $tags['hashtags'],
                        'mentions'        => $tags['mentions'],
@@ -480,7 +478,7 @@ class Post
                        // Collapse
                        if (($nb_children > 2) || ($thread_level > 1)) {
                                $result['children'][0]['comment_firstcollapsed'] = true;
-                               $result['children'][0]['num_comments'] = L10n::tt('%d comment', '%d comments', $total_children);
+                               $result['children'][0]['num_comments'] = DI::l10n()->tt('%d comment', '%d comments', $total_children);
                                $result['children'][0]['show_text'] = DI::l10n()->t('Show more');
                                $result['children'][0]['hide_text'] = DI::l10n()->t('Show fewer');
                                if ($thread_level > 1) {
@@ -493,7 +491,7 @@ class Post
 
                if ($this->isToplevel()) {
                        $result['total_comments_num'] = "$total_children";
-                       $result['total_comments_text'] = L10n::tt('comment', 'comments', $total_children);
+                       $result['total_comments_text'] = DI::l10n()->tt('comment', 'comments', $total_children);
                }
 
                $result['private'] = $item['private'];