fixes #855 trigger on group deletion

* adding trigger (admin screen)
* adding trigger (API)
* update trigger list
This commit is contained in:
Teatek
2019-02-11 14:02:30 +01:00
committed by Pierrick Le Gall
parent 339c54fa23
commit f308af3e46
3 changed files with 23 additions and 7 deletions
+7 -2
View File
@@ -135,11 +135,14 @@ DELETE
pwg_query($query);
$query = '
SELECT name
SELECT id, name
FROM '. GROUPS_TABLE .'
WHERE id IN('. $group_id_string .')
;';
$groupnames = array_from_query($query, 'name');
$group_list = query2array($query, 'id', 'name');
$groupnames = array_values($group_list);
$groupids = array_keys($group_list);
// destruction of the group
$query = '
@@ -149,6 +152,8 @@ DELETE
;';
pwg_query($query);
trigger_notify('delete_group', $groupids);
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
invalidate_user_cache();