]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Help.php
Merge pull request #12895 from HankG/mastodon-status-edit-fix-deleting-all-images
[friendica.git] / src / Module / Help.php
index 5440fd97d8a33c63d2d359528f20c5e0ac864268..3212d2fe48c6ac339e9c7d613f62ac2ea4cedc08 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -32,16 +32,15 @@ use Friendica\Network\HTTPException;
  */
 class Help extends BaseModule
 {
-       public static function content()
+       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) {
@@ -103,7 +102,7 @@ class Help extends BaseModule
 
                                        $idNum[$level] ++;
 
-                                       $href = DI::baseUrl()->get() . "/help/{$filename}#{$anchor}";
+                                       $href = "help/{$filename}#{$anchor}";
                                        $toc .= "<li><a href=\"{$href}\">" . strip_tags($line) . "</a></li>";
                                        $id = implode("_", array_slice($idNum, 1, $level));
                                        $line = "<a name=\"{$id}\"></a>" . $line;