Hi,
If I had a warning action with a 1 point threshold, this warning action doesn't get picked up on the next warning for a user with non-zero warning points.
For users without any warning points it functions as expected.
The function XenForo_Model_Warning::userWarningPointsIncreased has the following bit of code:
Which for a new points-based warning action is obviously wrong.
Calling XenForo_Model_Warning::triggerWarningAction when adding a new warning action is the obvious solution, to have warning action apply as expected.
Editing obviously gets trickier, but it's really just a case of applying variant of 'XenForo_Model_Warning::userWarningPointsChanged' to determine if the warning action needs to be applied or removed.
If I had a warning action with a 1 point threshold, this warning action doesn't get picked up on the next warning for a user with non-zero warning points.
For users without any warning points it functions as expected.
The function XenForo_Model_Warning::userWarningPointsIncreased has the following bit of code:
Code:
if ($action['points'] <= $oldPoints)
{
continue; // already triggered - not necessarily true when an action is added though, but probably ok
}
Calling XenForo_Model_Warning::triggerWarningAction when adding a new warning action is the obvious solution, to have warning action apply as expected.
Editing obviously gets trickier, but it's really just a case of applying variant of 'XenForo_Model_Warning::userWarningPointsChanged' to determine if the warning action needs to be applied or removed.