]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Conversation/Network.php
Merge remote-tracking branch 'upstream/2021.12-rc' into user-banner
[friendica.git] / src / Module / Conversation / Network.php
index 06fec9ee7cc2aa57e1de9da743c9981ed537f28c..908d0a63b4df251c7c67935d8ab75b7a7d8963ba 100644 (file)
@@ -1,4 +1,23 @@
 <?php
+/**
+ * @copyright Copyright (C) 2010-2022, the Friendica project
+ *
+ * @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\Module\Conversation;
 
@@ -57,13 +76,13 @@ class Network extends BaseModule
        /** @var string */
        protected static $order;
 
-       public function content(): string
+       protected function content(array $request = []): string
        {
                if (!local_user()) {
                        return Login::form();
                }
 
-               self::parseRequest($_GET);
+               $this->parseRequest($_GET);
 
                $module = 'network';
 
@@ -272,11 +291,11 @@ class Network extends BaseModule
                return Renderer::replaceMacros($tpl, ['$tabs' => $arr['tabs']]);
        }
 
-       protected static function parseRequest(array $get)
+       protected function parseRequest(array $get)
        {
-               self::$groupId = static::$parameters['group_id'] ?? 0;
+               self::$groupId = $this->parameters['group_id'] ?? 0;
 
-               self::$forumContactId = static::$parameters['contact_id'] ?? 0;
+               self::$forumContactId = $this->parameters['contact_id'] ?? 0;
 
                self::$selectedTab = Session::get('network-tab', DI::pConfig()->get(local_user(), 'network.view', 'selected_tab', ''));
 
@@ -317,13 +336,13 @@ class Network extends BaseModule
                Session::set('network-tab', self::$selectedTab);
                DI::pConfig()->set(local_user(), 'network.view', 'selected_tab', self::$selectedTab);
 
-               self::$accountTypeString = $get['accounttype'] ?? static::$parameters['accounttype'] ?? '';
+               self::$accountTypeString = $get['accounttype'] ?? $this->parameters['accounttype'] ?? '';
                self::$accountType = User::getAccountTypeByString(self::$accountTypeString);
 
                self::$network = $get['nets'] ?? '';
 
-               self::$dateFrom = static::$parameters['from'] ?? '';
-               self::$dateTo = static::$parameters['to'] ?? '';
+               self::$dateFrom = $this->parameters['from'] ?? '';
+               self::$dateTo = $this->parameters['to'] ?? '';
 
                if (DI::mode()->isMobile()) {
                        self::$itemsPerPage = DI::pConfig()->get(local_user(), 'system', 'itemspage_mobile_network',