From 7991db14be2078aacc4f731214c36e3fa3c6c507 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 12 May 2018 16:41:09 -0700 Subject: hubzilla issue #1045 - display pubsites link in info area if invite only --- Zotlabs/Module/Register.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module/Register.php') diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php index 6bdffd034..4ab1ccd81 100644 --- a/Zotlabs/Module/Register.php +++ b/Zotlabs/Module/Register.php @@ -201,6 +201,15 @@ class Register extends \Zotlabs\Web\Controller { $registration_is = t('Registration on this hub is by approval only.'); $other_sites = t('Register at another affiliated hub.'); } + + + $invitations = false; + + if(intval(get_config('system','invitation_only'))) { + $invitations = true; + $registration_is = t('Registration on this hub is by invitation only.'); + $other_sites = t('Register at another affiliated hub.'); + } $max_dailies = intval(get_config('system','max_daily_registrations')); if($max_dailies) { @@ -270,8 +279,7 @@ class Register extends \Zotlabs\Web\Controller { '$reg_is' => $registration_is, '$registertext' => bbcode(get_config('system','register_text')), '$other_sites' => $other_sites, - '$invitations' => get_config('system','invitation_only'), - '$invite_desc' => t('Membership on this site is by invitation only.'), + '$invitations' => $invitations, '$invite_code' => $invite_code, '$auto_create' => $auto_create, '$name' => $name, -- cgit v1.2.3