]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Tos.php
Refactor deprecated App::internalRedirect() to DI::baseUrl()->redirect()
[friendica.git] / src / Module / Tos.php
index c69557d5dcebc7a8f4c419fa48b941adb8e5fd55..b28c98de7b35e55a7b7bc15cb567affedaf8dcd0 100644 (file)
@@ -14,6 +14,7 @@ use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
 use Friendica\Core\System;
 use Friendica\Content\Text\BBCode;
+use Friendica\DI;
 
 class Tos extends BaseModule
 {
@@ -47,10 +48,10 @@ class Tos extends BaseModule
         * dealings with their own node so a TOS is not necessary.
         *
         **/
-       public static function init($parameters)
+       public static function init(array $parameters = [])
        {
                if (strlen(Config::get('system','singleuser'))) {
-                       self::getApp()->internalRedirect('profile/' . Config::get('system','singleuser'));
+                       DI::baseUrl()->redirect('profile/' . Config::get('system','singleuser'));
                }
        }
 
@@ -66,7 +67,7 @@ class Tos extends BaseModule
         * @return string
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function content($parameters) {
+       public static function content(array $parameters = []) {
                $tpl = Renderer::getMarkupTemplate('tos.tpl');
                if (Config::get('system', 'tosdisplay')) {
                        return Renderer::replaceMacros($tpl, [