]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Help.php
Possibly Avoid database error when storing photo item
[friendica.git] / src / Module / Help.php
index a29e895579e3e0f5bcf72a0026174b8a28f56527..f4083c310badd7ea9060caf01bc632e2d3e6e0ac 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 = [])
+       protected function content(array $request = []): 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);