From b4c273113cc5d16dfa1ea3236dd8c78d1169cbf3 Mon Sep 17 00:00:00 2001 From: CiaranG Date: Thu, 19 Mar 2009 21:55:03 +0000 Subject: A couple more 'Join Now' messages that need disabling when the site is closed or invite only --- actions/showgroup.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'actions/showgroup.php') diff --git a/actions/showgroup.php b/actions/showgroup.php index b6022840b..58cc7a97c 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -390,11 +390,18 @@ class ShowgroupAction extends Action function showAnonymousMessage() { - $m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . - 'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' . - 'short messages about their life and interests. '. - '[Join now](%%%%action.register%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'), + if (!(common_config('site','closed') || common_config('site','inviteonly'))) { + $m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . + 'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' . + 'short messages about their life and interests. '. + '[Join now](%%%%action.register%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'), $this->group->nickname); + } else { + $m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . + 'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' . + 'short messages about their life and interests. '), + $this->group->nickname); + } $this->elementStart('div', array('id' => 'anon_notice')); $this->raw(common_markup_to_html($m)); $this->elementEnd('div'); -- cgit v1.2.3-54-g00ecf