summaryrefslogtreecommitdiff
path: root/actions/showgroup.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-03 09:33:38 -0800
committerBrion Vibber <brion@pobox.com>2010-03-03 09:33:38 -0800
commit9801c60bea121f96d3e8d4ae7b8e31d2c29b280d (patch)
tree5aacecf46f564408fad70a38ce2461e6d7b96c48 /actions/showgroup.php
parent1e63fda6695c8ab06f2cd8181de26f03f7f7a5d4 (diff)
parent11750e832f994013b2fbce860bd24d24f49a14db (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'actions/showgroup.php')
-rw-r--r--actions/showgroup.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/actions/showgroup.php b/actions/showgroup.php
index 4e1fcb6c7..a1dc3865b 100644
--- a/actions/showgroup.php
+++ b/actions/showgroup.php
@@ -300,20 +300,22 @@ class ShowgroupAction extends GroupDesignAction
$this->elementStart('div', 'entity_actions');
$this->element('h2', null, _('Group actions'));
$this->elementStart('ul');
- $this->elementStart('li', 'entity_subscribe');
- $cur = common_current_user();
- if ($cur) {
- if ($cur->isMember($this->group)) {
- $lf = new LeaveForm($this, $this->group);
- $lf->show();
- } else if (!Group_block::isBlocked($this->group, $cur->getProfile())) {
- $jf = new JoinForm($this, $this->group);
- $jf->show();
+ if (Event::handle('StartGroupSubscribe', array($this, $this->group))) {
+ $this->elementStart('li', 'entity_subscribe');
+ $cur = common_current_user();
+ if ($cur) {
+ if ($cur->isMember($this->group)) {
+ $lf = new LeaveForm($this, $this->group);
+ $lf->show();
+ } else if (!Group_block::isBlocked($this->group, $cur->getProfile())) {
+ $jf = new JoinForm($this, $this->group);
+ $jf->show();
+ }
}
+ $this->elementEnd('li');
+ Event::handle('EndGroupSubscribe', array($this, $this->group));
}
- $this->elementEnd('li');
-
$this->elementEnd('ul');
$this->elementEnd('div');
}