aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Invite.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-10-18 21:41:08 +0200
committerMario <mario@mariovavti.com>2021-10-18 21:41:08 +0200
commitc66a5ba7321bf39e9fedaf48260f09a2aaa7d855 (patch)
tree292c0cc0f62385174d52cd633cc484f49dcf17c5 /Zotlabs/Module/Invite.php
parent79f9b49dd77b14e2fe4f7de504a2128356252a2c (diff)
downloadvolse-hubzilla-c66a5ba7321bf39e9fedaf48260f09a2aaa7d855.tar.gz
volse-hubzilla-c66a5ba7321bf39e9fedaf48260f09a2aaa7d855.tar.bz2
volse-hubzilla-c66a5ba7321bf39e9fedaf48260f09a2aaa7d855.zip
invite: use the actual set language and check if we have a template for it
Diffstat (limited to 'Zotlabs/Module/Invite.php')
-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 76341d789..c301aaea2 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);