Added event hooks for group subscribe
This commit is contained in:
parent
ea10805e3f
commit
b65ee23e82
|
@ -363,6 +363,14 @@ EndProfileRemoteSubscribe: After showing the link to remote subscription
|
|||
- $userprofile: UserProfile widget
|
||||
- &$profile: the profile being shown
|
||||
|
||||
StartGroupSubscribe: Before showing the link to remote subscription
|
||||
- $action: the current action
|
||||
- $group: the group being shown
|
||||
|
||||
EndGroupSubscribe: After showing the link to remote subscription
|
||||
- $action: the current action
|
||||
- $group: the group being shown
|
||||
|
||||
StartProfilePageProfileSection: Starting to show the section of the
|
||||
profile page with the actual profile data;
|
||||
hook to prevent showing the profile (e.g.)
|
||||
|
|
|
@ -300,6 +300,7 @@ class ShowgroupAction extends GroupDesignAction
|
|||
$this->elementStart('div', 'entity_actions');
|
||||
$this->element('h2', null, _('Group actions'));
|
||||
$this->elementStart('ul');
|
||||
if (Event::handle('StartGroupSubscribe', array($this, $this->group))) {
|
||||
$this->elementStart('li', 'entity_subscribe');
|
||||
$cur = common_current_user();
|
||||
if ($cur) {
|
||||
|
@ -311,8 +312,9 @@ class ShowgroupAction extends GroupDesignAction
|
|||
$jf->show();
|
||||
}
|
||||
}
|
||||
|
||||
$this->elementEnd('li');
|
||||
Event::handle('EndGroupSubscribe', array($this, $this->group));
|
||||
}
|
||||
|
||||
$this->elementEnd('ul');
|
||||
$this->elementEnd('div');
|
||||
|
|
Loading…
Reference in New Issue
Block a user