Inconsistent prefix filter handling in XF and XFRM
I noticed two inconsistencies in the prefix filtering code between XF threads and XFRM resources.
Prefix validation
XF validates a selected thread prefix before adding it to the filters:
if ($input['prefix_id'] && $forum->isPrefixValid($input['prefix_id']))
{
$filters['prefix_id'] = $input['prefix_id'];
}
XFRM does not perform an equivalent validation for resource prefixes:
if ($input['prefix_id'])
{
$filters['prefix_id'] = $input['prefix_id'];
}
Would it make sense for XFRM to validate the resource prefix against the applicable category in the same way XF does for threads?
I noticed two inconsistencies in the prefix filtering code between XF threads and XFRM resources.
Prefix validation
XF validates a selected thread prefix before adding it to the filters:
if ($input['prefix_id'] && $forum->isPrefixValid($input['prefix_id']))
{
$filters['prefix_id'] = $input['prefix_id'];
}
XFRM does not perform an equivalent validation for resource prefixes:
if ($input['prefix_id'])
{
$filters['prefix_id'] = $input['prefix_id'];
}
Would it make sense for XFRM to validate the resource prefix against the applicable category in the same way XF does for threads?
Upvote
0