mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
Automatically exclude deleted groups from point/level/group integration
This commit is contained in:
parent
bb037427ae
commit
48e4746f7d
2 changed files with 23 additions and 0 deletions
|
|
@ -60,6 +60,25 @@ class pointController extends point
|
|||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Member group deletion trigger
|
||||
*/
|
||||
function triggerDeleteGroup(&$obj)
|
||||
{
|
||||
// Get the point module config
|
||||
$config = getModel('module')->getModuleConfig('point');
|
||||
// Get the group_srl of the deleted group
|
||||
$group_srl = $obj->group_srl;
|
||||
// Exclude deleted group from point/level/group integration
|
||||
if($config->point_group && isset($config->point_group[$group_srl]))
|
||||
{
|
||||
unset($config->point_group[$group_srl]);
|
||||
getController('module')->insertModuleConfig('point', $config);
|
||||
}
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief A trigger to add points to the member for creating a post
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue