aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-07-29 09:59:04 +0000
committerMario <mario@mariovavti.com>2024-07-29 09:59:04 +0000
commit52f7b508af7bd6eb00eb76b4e170b44a55be869f (patch)
treed72d94366a985be578cc4729fb9ac2078cbc267e /Zotlabs/Module
parent15f6bc93cf53cf05162d1314852f567ab2af2bc6 (diff)
parentd3093dce1bfd4685d5e11f828689630862f77bda (diff)
downloadvolse-hubzilla-52f7b508af7bd6eb00eb76b4e170b44a55be869f.tar.gz
volse-hubzilla-52f7b508af7bd6eb00eb76b4e170b44a55be869f.tar.bz2
volse-hubzilla-52f7b508af7bd6eb00eb76b4e170b44a55be869f.zip
Merge branch 'improve-help-locale-handling' into 'dev'
Improve handling of locale in Help module See merge request hubzilla/core!2140
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Help.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/Zotlabs/Module/Help.php b/Zotlabs/Module/Help.php
index fd5cacee6..851776591 100644
--- a/Zotlabs/Module/Help.php
+++ b/Zotlabs/Module/Help.php
@@ -6,6 +6,7 @@ use Michelf\MarkdownExtra;
/**
* You can create local site resources in doc/Site.md and either link to doc/Home.md for the standard resources
* or use our include mechanism to include it on your local page.
+ *
*@code
* #include doc/Home.md;
*@endcode
@@ -19,14 +20,6 @@ class Help extends \Zotlabs\Web\Controller {
private string $heading_slug = '';
/**
- * Associative array containing the detected language.
- */
- public array $lang = [
- 'language' => 'en', //! Detected language, 2-letter ISO 639-1 code ("en")
- 'from_url' => false, //! true if language from URL overrides browser default
- ];
-
- /**
* Pre-check before processing request.
*
* Determine language requested, and ensure that a topic was requested.
@@ -160,6 +153,10 @@ class Help extends \Zotlabs\Web\Controller {
array_shift($args);
}
+ if (empty($args)) {
+ goaway("/help/{$this->lang['language']}/about/about");
+ }
+
// Keep the first remaining arg as the heading slug
$this->heading_slug = $args[0];