]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't show create-a-group link if not logged in
authorEvan Prodromou <evan@controlyourself.ca>
Mon, 15 Jun 2009 23:22:08 +0000 (16:22 -0700)
committerEvan Prodromou <evan@controlyourself.ca>
Mon, 15 Jun 2009 23:22:08 +0000 (16:22 -0700)
actions/groups.php

index 26b52a5fcd4dde75618205ccb3716900a8a4d6b8..b49d80f3779b96cc47401be41e8cc529d093efcf 100644 (file)
@@ -100,11 +100,13 @@ class GroupsAction extends Action
 
     function showContent()
     {
-        $this->elementStart('p', array('id' => 'new_group'));
-        $this->element('a', array('href' => common_local_url('newgroup'),
-                                  'class' => 'more'),
-                       _('Create a new group'));
-        $this->elementEnd('p');
+        if (common_logged_in()) {
+            $this->elementStart('p', array('id' => 'new_group'));
+            $this->element('a', array('href' => common_local_url('newgroup'),
+                                      'class' => 'more'),
+                           _('Create a new group'));
+            $this->elementEnd('p');
+        }
 
         $offset = ($this->page-1) * GROUPS_PER_PAGE;
         $limit =  GROUPS_PER_PAGE + 1;