aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Group.php
diff options
context:
space:
mode:
authorM. Dent <dentm42@gmail.com>2019-01-22 12:13:16 +0100
committerMario <mario@mariovavti.com>2019-01-22 12:13:16 +0100
commitcd8a0f33b5df4ae556bfcf274cfb3c4bd5fcdbf7 (patch)
treeb9d571856acbcc20b131099e12a39e1ffc56401c /Zotlabs/Module/Group.php
parent4c0378eeae7bc3ded539d3e25d61aed097dccdec (diff)
downloadvolse-hubzilla-cd8a0f33b5df4ae556bfcf274cfb3c4bd5fcdbf7.tar.gz
volse-hubzilla-cd8a0f33b5df4ae556bfcf274cfb3c4bd5fcdbf7.tar.bz2
volse-hubzilla-cd8a0f33b5df4ae556bfcf274cfb3c4bd5fcdbf7.zip
Add remaining hook insertions
Diffstat (limited to 'Zotlabs/Module/Group.php')
-rw-r--r--Zotlabs/Module/Group.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/Zotlabs/Module/Group.php b/Zotlabs/Module/Group.php
index 3dcf903ad..12edf8428 100644
--- a/Zotlabs/Module/Group.php
+++ b/Zotlabs/Module/Group.php
@@ -66,6 +66,9 @@ class Group extends Controller {
$groupname = notags(trim($_POST['groupname']));
$public = intval($_POST['public']);
+ $hookinfo = [ 'pgrp_extras' => '', 'group'=>$group['id'] ];
+ call_hooks ('privacygroup_extras_post',$hookinfo);
+
if((strlen($groupname)) && (($groupname != $group['gname']) || ($public != $group['visible']))) {
$r = q("UPDATE pgrp SET gname = '%s', visible = %d WHERE uid = %d AND id = %d",
dbesc($groupname),
@@ -76,8 +79,6 @@ class Group extends Controller {
if($r)
info( t('Privacy group updated.') . EOL );
- $hookinfo = [ 'pgrp_extras' => '', 'group'=>$group['id'] ];
- call_hooks ('privacygroup_extras_post',$hookinfo);
build_sync_packet(local_channel(),null,true);
}
@@ -242,6 +243,10 @@ class Group extends Controller {
}
}
+ $hookinfo = [ 'pgrp_extras' => '', 'group'=>$group['id'] ];
+ call_hooks ('privacygroup_extras',$hookinfo);
+ $pgrp_extras = $hookinfo['pgrp_extras'];
+
$context = $context + array(
'$title' => sprintf(t('Privacy Group: %s'), $group['gname']),
'$details_label' => t('Edit'),
@@ -252,6 +257,7 @@ class Group extends Controller {
'$form_security_token_edit' => get_form_security_token('group_edit'),
'$delete' => t('Delete Group'),
'$form_security_token_drop' => get_form_security_token("group_drop"),
+ '$pgrp_extras' => $pgrp_extras,
);
}
@@ -295,6 +301,7 @@ class Group extends Controller {
$context['$groupeditor'] = $groupeditor;
$context['$desc'] = t('Click a channel to toggle membership');
+ $context['$pgrp_extras'] = $pgrp_extras;
if($change) {
$tpl = get_markup_template('groupeditor.tpl');