Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
This commit is contained in:
commit
ac5e7b727a
|
@ -1090,3 +1090,10 @@ EndGroupActionsList: End the list of actions on a group profile page (before </u
|
||||||
- $action: action being executed (for output and params)
|
- $action: action being executed (for output and params)
|
||||||
- $group: group for the page
|
- $group: group for the page
|
||||||
|
|
||||||
|
StartGroupProfileElements: Start showing stuff about the group on its profile page
|
||||||
|
- $action: action being executed (for output and params)
|
||||||
|
- $group: group for the page
|
||||||
|
|
||||||
|
EndGroupProfileElements: Start showing stuff about the group on its profile page
|
||||||
|
- $action: action being executed (for output and params)
|
||||||
|
- $group: group for the page
|
||||||
|
|
|
@ -181,6 +181,7 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$this->showGroupProfile();
|
$this->showGroupProfile();
|
||||||
|
$this->showGroupActions();
|
||||||
$this->showGroupNotices();
|
$this->showGroupNotices();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,6 +217,8 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
$this->elementStart('div', array('id' => 'i',
|
$this->elementStart('div', array('id' => 'i',
|
||||||
'class' => 'entity_profile vcard author'));
|
'class' => 'entity_profile vcard author'));
|
||||||
|
|
||||||
|
if (Event::handle('StartGroupProfileElements', array($this, $this->group))) {
|
||||||
|
|
||||||
// TRANS: Group profile header (h2). Text hidden by default.
|
// TRANS: Group profile header (h2). Text hidden by default.
|
||||||
$this->element('h2', null, _('Group profile'));
|
$this->element('h2', null, _('Group profile'));
|
||||||
|
|
||||||
|
@ -296,8 +299,14 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->elementEnd('div');
|
Event::handle('EndGroupProfileElements', array($this, $this->group));
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->elementEnd('div');
|
||||||
|
}
|
||||||
|
|
||||||
|
function showGroupActions()
|
||||||
|
{
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
$this->elementStart('div', 'entity_actions');
|
$this->elementStart('div', 'entity_actions');
|
||||||
// TRANS: Group actions header (h2). Text hidden by default.
|
// TRANS: Group actions header (h2). Text hidden by default.
|
||||||
|
|
|
@ -460,6 +460,38 @@ class GroupPrivateMessagePlugin extends Plugin
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show an indicator that the group is (essentially) private on the group page
|
||||||
|
*
|
||||||
|
* @param Action $action The action being shown
|
||||||
|
* @param User_group $group The group being shown
|
||||||
|
*
|
||||||
|
* @return boolean hook value
|
||||||
|
*/
|
||||||
|
|
||||||
|
function onEndGroupProfileElements($action, $group)
|
||||||
|
{
|
||||||
|
$gps = Group_privacy_settings::forGroup($group);
|
||||||
|
|
||||||
|
if ($gps->allow_privacy == Group_privacy_settings::ALWAYS) {
|
||||||
|
$action->element('p', 'privategroupindicator', _('Private'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onStartShowExportData($action)
|
||||||
|
{
|
||||||
|
if ($action instanceof ShowgroupAction) {
|
||||||
|
$gps = Group_privacy_settings::forGroup($action->group);
|
||||||
|
|
||||||
|
if ($gps->allow_privacy == Group_privacy_settings::ALWAYS) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function onPluginVersion(&$versions)
|
function onPluginVersion(&$versions)
|
||||||
{
|
{
|
||||||
$versions[] = array('name' => 'GroupPrivateMessage',
|
$versions[] = array('name' => 'GroupPrivateMessage',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user