]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Help.php
Merge pull request #10994 from nupplaphil/feat/module_constructor
[friendica.git] / src / Module / Help.php
index a29e895579e3e0f5bcf72a0026174b8a28f56527..d0b61c2211c9f9ddee5a87ad6b04a3e94ccec8f2 100644 (file)
@@ -26,23 +26,21 @@ use Friendica\Content\Nav;
 use Friendica\Content\Text\Markdown;
 use Friendica\DI;
 use Friendica\Network\HTTPException;
-use Friendica\Util\Strings;
 
 /**
  * Shows the friendica help based on the /doc/ directory
  */
 class Help extends BaseModule
 {
-       public static function content(array $parameters = [])
+       public function content(): string
        {
                Nav::setSelected('help');
 
                $text = '';
                $filename = '';
 
-               $a = DI::app();
                $config = DI::config();
-               $lang = $config->get('system', 'language');
+               $lang = DI::session()->get('language', $config->get('system', 'language'));
 
                // @TODO: Replace with parameter from router
                if (DI::args()->getArgc() > 1) {
@@ -59,7 +57,7 @@ class Help extends BaseModule
                        $title = basename($path);
                        $filename = $path;
                        $text = self::loadDocFile('doc/' . $path . '.md', $lang);
-                       DI::page()['title'] = DI::l10n()->t('Help:') . ' ' . str_replace('-', ' ', Strings::escapeTags($title));
+                       DI::page()['title'] = DI::l10n()->t('Help:') . ' ' . str_replace('-', ' ', $title);
                }
 
                $home = self::loadDocFile('doc/Home.md', $lang);