]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Tos.php
Merge pull request #7044 from MrPetovan/task/router
[friendica.git] / src / Module / Tos.php
index e8a152b5078f28577d1dd77a8914e6cc6d2456af..6dca554b25a593c6bc44a885c380d4ab52483525 100644 (file)
@@ -11,6 +11,7 @@ namespace Friendica\Module;
 use Friendica\BaseModule;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
+use Friendica\Core\Renderer;
 use Friendica\Core\System;
 use Friendica\Content\Text\BBCode;
 
@@ -49,9 +50,10 @@ class Tos extends BaseModule
        public static function init()
        {
                if (strlen(Config::get('system','singleuser'))) {
-                       goaway(System::baseUrl()."/profile/" . Config::get('system','singleuser'));
+                       self::getApp()->internalRedirect('profile/' . Config::get('system','singleuser'));
                }
        }
+
        /**
         * @brief generate the content of the /tos page
         *
@@ -62,11 +64,12 @@ class Tos extends BaseModule
         *     This privacy statement has fixed text, so it can be translated easily.
         *
         * @return string
-        **/
+        * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+        */
        public static function content() {
-               $tpl = get_markup_template('tos.tpl');
+               $tpl = Renderer::getMarkupTemplate('tos.tpl');
                if (Config::get('system', 'tosdisplay')) {
-                       return replace_macros($tpl, [
+                       return Renderer::replaceMacros($tpl, [
                                '$title' => L10n::t('Terms of Service'),
                                '$tostext' => BBCode::convert(Config::get('system', 'tostext')),
                                '$displayprivstatement' => Config::get('system', 'tosprivstatement'),