Merge branch 'patch-20190114a' into 'dev'
Add remaining hook insertions See merge request hubzilla/core!1471
This commit is contained in:
commit
273beb016b
@ -66,6 +66,9 @@ class Group extends Controller {
|
|||||||
$groupname = notags(trim($_POST['groupname']));
|
$groupname = notags(trim($_POST['groupname']));
|
||||||
$public = intval($_POST['public']);
|
$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']))) {
|
if((strlen($groupname)) && (($groupname != $group['gname']) || ($public != $group['visible']))) {
|
||||||
$r = q("UPDATE pgrp SET gname = '%s', visible = %d WHERE uid = %d AND id = %d",
|
$r = q("UPDATE pgrp SET gname = '%s', visible = %d WHERE uid = %d AND id = %d",
|
||||||
dbesc($groupname),
|
dbesc($groupname),
|
||||||
@ -76,8 +79,6 @@ class Group extends Controller {
|
|||||||
if($r)
|
if($r)
|
||||||
info( t('Privacy group updated.') . EOL );
|
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);
|
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(
|
$context = $context + array(
|
||||||
'$title' => sprintf(t('Privacy Group: %s'), $group['gname']),
|
'$title' => sprintf(t('Privacy Group: %s'), $group['gname']),
|
||||||
'$details_label' => t('Edit'),
|
'$details_label' => t('Edit'),
|
||||||
@ -252,6 +257,7 @@ class Group extends Controller {
|
|||||||
'$form_security_token_edit' => get_form_security_token('group_edit'),
|
'$form_security_token_edit' => get_form_security_token('group_edit'),
|
||||||
'$delete' => t('Delete Group'),
|
'$delete' => t('Delete Group'),
|
||||||
'$form_security_token_drop' => get_form_security_token("group_drop"),
|
'$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['$groupeditor'] = $groupeditor;
|
||||||
$context['$desc'] = t('Click a channel to toggle membership');
|
$context['$desc'] = t('Click a channel to toggle membership');
|
||||||
|
$context['$pgrp_extras'] = $pgrp_extras;
|
||||||
|
|
||||||
if($change) {
|
if($change) {
|
||||||
$tpl = get_markup_template('groupeditor.tpl');
|
$tpl = get_markup_template('groupeditor.tpl');
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<input type='hidden' name='form_security_token' value='{{$form_security_token_edit}}'>
|
<input type='hidden' name='form_security_token' value='{{$form_security_token_edit}}'>
|
||||||
{{include file="field_input.tpl" field=$gname}}
|
{{include file="field_input.tpl" field=$gname}}
|
||||||
{{include file="field_checkbox.tpl" field=$public}}
|
{{include file="field_checkbox.tpl" field=$public}}
|
||||||
|
{{$pgrp_extras}}
|
||||||
<a href="group/drop/{{$gid}}?t={{$form_security_token_drop}}" onclick="return confirmDelete();" class="btn btn-sm btn-danger">
|
<a href="group/drop/{{$gid}}?t={{$form_security_token_drop}}" onclick="return confirmDelete();" class="btn btn-sm btn-danger">
|
||||||
{{$delete}}
|
{{$delete}}
|
||||||
</a>
|
</a>
|
||||||
|
Reference in New Issue
Block a user