X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FHelp.php;h=d0b61c2211c9f9ddee5a87ad6b04a3e94ccec8f2;hb=fd7c1d766c2c922909b858f7af6aa440fbc697aa;hp=95aeb16459c7be97861b4c590975f4a6189a4664;hpb=38a5358bfa646ae13a4a1a385741890fa88d9b7f;p=friendica.git diff --git a/src/Module/Help.php b/src/Module/Help.php index 95aeb16459..d0b61c2211 100644 --- a/src/Module/Help.php +++ b/src/Module/Help.php @@ -26,30 +26,28 @@ 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 ($a->argc > 1) { + if (DI::args()->getArgc() > 1) { $path = ''; // looping through the argv keys bigger than 0 to build // a path relative to /help - for ($x = 1; $x < $a->argc; $x ++) { + for ($x = 1; $x < DI::args()->getArgc(); $x ++) { if (strlen($path)) { $path .= '/'; } @@ -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);