aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-10-18 21:41:08 +0200
committerMario <mario@mariovavti.com>2021-10-18 21:44:06 +0200
commitd639104b713652adb12e239e0a68825ae8ac8546 (patch)
tree2bf4d6c622d2849d0747f71d49406240680d2bd4
parenta5835b0e85a60b630c3de8a5a3a1c7b46594e148 (diff)
downloadvolse-hubzilla-d639104b713652adb12e239e0a68825ae8ac8546.tar.gz
volse-hubzilla-d639104b713652adb12e239e0a68825ae8ac8546.tar.bz2
volse-hubzilla-d639104b713652adb12e239e0a68825ae8ac8546.zip
invite: use the actual set language and check if we have a template for it
(cherry picked from commit c66a5ba7321bf39e9fedaf48260f09a2aaa7d855)
-rw-r--r--Zotlabs/Module/Invite.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Invite.php b/Zotlabs/Module/Invite.php
index 40f972385..a0bd10ff1 100644
--- a/Zotlabs/Module/Invite.php
+++ b/Zotlabs/Module/Invite.php
@@ -422,8 +422,6 @@ class Invite extends Controller {
// let take one descriptive for template (as said is never used)
$invite_code = 'INVITATE2020';
- // what languages we use now
- $lccmy = ((isset(App::$config['system']['language'])) ? App::$config['system']['language'] : 'en');
// and all the localized templates belonging to invite
$tpls = glob('view/*/invite.*.tpl');
@@ -444,6 +442,9 @@ class Invite extends Controller {
$langs = array_keys($tpla);
asort($langs);
+ // Use the current language if we have a template for it. Otherwise fall back to 'en'.
+ $lccmy = ((in_array(App::$language, $langs)) ? App::$language : 'en');
+
$tplx = array_unique($tplx);
asort($tplx);