From: Evan Prodromou Date: Mon, 28 Mar 2011 20:24:17 +0000 (-0400) Subject: set default address for showgroup X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a7380d593371b2e2d20fb2b03c2df825d5c18dff;p=quix0rs-gnu-social.git set default address for showgroup --- diff --git a/actions/showgroup.php b/actions/showgroup.php index d77fbeed71..512ca6a0ee 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -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