]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Widget/ContactBlock.php
Merge remote-tracking branch 'upstream/develop' into write-tags
[friendica.git] / src / Content / Widget / ContactBlock.php
index e4bf8e7eaf80d8e499944258379eeb22fa313923..47fac09a83aeb292476f7e0ac0077b4479ff36d1 100644 (file)
@@ -1,15 +1,28 @@
 <?php
-
-/*
- * @file src/Content/Widget/ContactBlock.php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
  */
 
 namespace Friendica\Content\Widget;
 
 use Friendica\Content\Text\HTML;
 use Friendica\Core\Hook;
-use Friendica\Core\L10n;
-use Friendica\Core\PConfig;
 use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
@@ -56,7 +69,7 @@ class ContactBlock
                        'network' => [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::DIASPORA, Protocol::FEED],
                ]);
 
-               $contacts_title = L10n::t('No contacts');
+               $contacts_title = DI::l10n()->t('No contacts');
 
                $micropro = [];
 
@@ -88,7 +101,7 @@ class ContactBlock
                                $contacts_stmt = DBA::select('contact', ['id', 'uid', 'addr', 'url', 'name', 'thumb', 'network'], ['id' => $contact_ids]);
 
                                if (DBA::isResult($contacts_stmt)) {
-                                       $contacts_title = L10n::tt('%d Contact', '%d Contacts', $total);
+                                       $contacts_title = DI::l10n()->tt('%d Contact', '%d Contacts', $total);
                                        $micropro = [];
 
                                        while ($contact = DBA::fetch($contacts_stmt)) {
@@ -107,7 +120,7 @@ class ContactBlock
                $o = Renderer::replaceMacros($tpl, [
                        '$contacts' => $contacts_title,
                        '$nickname' => $profile['nickname'],
-                       '$viewcontacts' => L10n::t('View Contacts'),
+                       '$viewcontacts' => DI::l10n()->t('View Contacts'),
                        '$micropro' => $micropro,
                ]);