- Affected version
- 2.1.10 Patch 2
I'm fairly sure you want to check the key name (ie3) To support this we're now explicitly handling the base pathing of any moderator log action param that ends inurl
(generally we store URLs withnopath
)
url
), not the actual action param value (ie the url itself).
PHP:
protected function getActionPhraseParams(ModeratorLog $log)
{
$pather = \XF::app()['request.pather'];
$params = $log->action_params;
foreach ($params AS $key => $param)
{
if (preg_match('/url$/i', $param))
{
$params[$key] = $pather($param, 'base');
}
}
return $params;
}
preg_match('/url$/i', $key)
.Otherwise these
action_params
are not transformed as expected;
JSON:
{"url":"threads\/thread-title2.43027\/","title":"Thread title2"}