From a7380d593371b2e2d20fb2b03c2df825d5c18dff Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 28 Mar 2011 16:24:17 -0400 Subject: [PATCH] set default address for showgroup --- actions/showgroup.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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