]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/ForumManager.php
Merge pull request #2 from friendica/master
[friendica.git] / src / Content / ForumManager.php
index 3a564e328df228e99537728436d676952d03b5ab..4f09b8a1126a3cc0512f763d9ffc307a9a977be5 100644 (file)
@@ -7,6 +7,7 @@ namespace Friendica\Content;
 
 use Friendica\App;
 use Friendica\Content\Feature;
+use Friendica\Core\L10n;
 use Friendica\Core\System;
 use Friendica\Database\DBM;
 use dba;
@@ -35,7 +36,7 @@ class ForumManager
         */
        public static function getList($uid, $lastitem, $showhidden = true, $showprivate = false)
        {
-               $forumlist = array();
+               $forumlist = [];
 
                $order = (($showhidden) ? '' : ' AND NOT `hidden` ');
                $order .= (($lastitem) ? ' ORDER BY `last-item` DESC ' : ' ORDER BY `name` ASC ');
@@ -59,13 +60,13 @@ class ForumManager
                }
 
                while ($contact = dba::fetch($contacts)) {
-                       $forumlist[] = array(
+                       $forumlist[] = [
                                'url'   => $contact['url'],
                                'name'  => $contact['name'],
                                'id'    => $contact['id'],
                                'micro' => $contact['micro'],
                                'thumb' => $contact['thumb'],
-                       );
+                       ];
                }
                dba::close($contacts);
 
@@ -104,7 +105,7 @@ class ForumManager
                        foreach ($contacts as $contact) {
                                $selected = (($cid == $contact['id']) ? ' forum-selected' : '');
 
-                               $entry = array(
+                               $entry = [
                                        'url' => 'network?f=&cid=' . $contact['id'],
                                        'external_url' => 'redir/' . $contact['id'],
                                        'name' => $contact['name'],
@@ -112,7 +113,7 @@ class ForumManager
                                        'selected'      => $selected,
                                        'micro' => System::removedBaseUrl(proxy_url($contact['micro'], false, PROXY_SIZE_MICRO)),
                                        'id' => ++$id,
-                               );
+                               ];
                                $entries[] = $entry;
                        }
 
@@ -120,13 +121,13 @@ class ForumManager
 
                        $o .= replace_macros(
                                $tpl,
-                               array(
-                                       '$title'        => t('Forums'),
+                               [
+                                       '$title'        => L10n::t('Forums'),
                                        '$forums'       => $entries,
-                                       '$link_desc'    => t('External link to forum'),
+                                       '$link_desc'    => L10n::t('External link to forum'),
                                        '$total'        => $total,
                                        '$visible_forums' => $visible_forums,
-                                       '$showmore'     => t('show more'))
+                                       '$showmore'     => L10n::t('show more')]
                        );
                }