aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Invite.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Invite.php')
-rw-r--r--Zotlabs/Module/Invite.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/Zotlabs/Module/Invite.php b/Zotlabs/Module/Invite.php
index 40f972385..2a126ac27 100644
--- a/Zotlabs/Module/Invite.php
+++ b/Zotlabs/Module/Invite.php
@@ -129,11 +129,11 @@ class Invite extends Controller {
if(! $recip) continue;
// see if we have an email address who@domain.tld
- if (!preg_match('/^.{2,64}\@[a-z0-9.-]{4,32}\.[a-z]{2,12}$/', $recip)) {
- $feedbk .= 'ZAI0203E ' . ($n+1) . ': ' . sprintf( t('(%s) : Not a valid email address'), $recip) . $eol;
- $ko++;
- continue;
- }
+ //if (!preg_match('/^.{2,64}\@[a-z0-9.-]{2,32}\.[a-z]{2,12}$/', $recip)) {
+ //$feedbk .= 'ZAI0203E ' . ($n+1) . ': ' . sprintf( t('(%s) : Not a valid email address'), $recip) . $eol;
+ //$ko++;
+ //continue;
+ //}
if(! validate_email($recip)) {
$feedbk .= 'ZAI0204E ' . ($n+1) . ': ' . sprintf( t('(%s) : Not a real email address'), $recip) . $eol;
$ko++;
@@ -225,7 +225,7 @@ class Invite extends Controller {
'$projectname' => t('$Projectname'),
'$invite_code' => $invite_code,
'$invite_where' => z_root() . '/register',
- '$invite_whereami' => str_replace('@', '@+', $reonar['whereami']),
+ '$invite_whereami' => $reonar['whereami'],
'$invite_whoami' => z_root() . '/channel/' . $reonar['whoami'],
'$invite_anywhere' => z_root() . '/pubsites'
)
@@ -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);