]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Get rid of 'Join now...' message if site is closed or invite only. See ticket #1335
authorCiaranG <ciaran@ciarang.com>
Thu, 19 Mar 2009 18:08:49 +0000 (18:08 +0000)
committerCiaranG <ciaran@ciarang.com>
Thu, 19 Mar 2009 18:08:49 +0000 (18:08 +0000)
actions/public.php

index a20ae40321ca17b36ae28313f4a87eac90d69f92..9b22e0a2ceefe1ff991453cc4e37abab12b6a559 100644 (file)
@@ -207,9 +207,14 @@ class PublicAction extends Action
 
     function showAnonymousMessage()
     {
-               $m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
-               'based on the Free Software [Laconica](http://laconi.ca/) tool. ' .
-               '[Join now](%%action.register%%) to share notices about yourself with friends, family, and colleagues! ([Read more](%%doc.help%%))');
+        if (! (common_config('site','closed') || common_config('site','inviteonly'))) {
+           $m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
+                  'based on the Free Software [Laconica](http://laconi.ca/) tool. ' .
+                  '[Join now](%%action.register%%) to share notices about yourself with friends, family, and colleagues! ([Read more](%%doc.help%%))');
+        } else {
+            $m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
+                   'based on the Free Software [Laconica](http://laconi.ca/) tool.');
+        }
         $this->elementStart('div', array('id' => 'anon_notice'));
         $this->raw(common_markup_to_html($m));
         $this->elementEnd('div');