]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
set default address for showgroup
authorEvan Prodromou <evan@status.net>
Mon, 28 Mar 2011 20:24:17 +0000 (16:24 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 28 Mar 2011 20:24:17 +0000 (16:24 -0400)
actions/showgroup.php

index d77fbeed7173f353694ccb463da01142b89e5886..512ca6a0ee262d71d89d49c1899164d0ce84bf8a 100644 (file)
@@ -365,6 +365,18 @@ class ShowgroupAction extends GroupDesignAction
         $this->raw(common_markup_to_html($m));
         $this->elementEnd('div');
     }
+
+    function noticeFormOptions()
+    {
+        $options = parent::noticeFormOptions();
+        $cur = common_current_user();
+
+        if (!empty($cur) && $cur->isMember($this->group)) {
+            $options['to_group'] =  $this->group;
+        }
+
+        return $options;
+    }
 }
 
 class GroupAdminSection extends ProfileSection