mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 07:58:56 +02:00
[ticket/11525] Prefix id parameter with 'g' again when its a group avatar
PHPBB3-11525
This commit is contained in:
parent
47f2caff6b
commit
aa84f7de04
@ -183,8 +183,9 @@ class manager
|
|||||||
* @param array $row User data or group data
|
* @param array $row User data or group data
|
||||||
* @param string $prefix Prefix of data keys (e.g. user), should not include the trailing underscore
|
* @param string $prefix Prefix of data keys (e.g. user), should not include the trailing underscore
|
||||||
*
|
*
|
||||||
* @return array User data or group data with keys that have been
|
* @return array User or group data with keys that have been
|
||||||
* stripped from the preceding "user_" or "group_"
|
* stripped from the preceding "user_" or "group_"
|
||||||
|
* Also the group id is prefixed with g, when the prefix group is removed.
|
||||||
*/
|
*/
|
||||||
static public function clean_row($row, $prefix = '')
|
static public function clean_row($row, $prefix = '')
|
||||||
{
|
{
|
||||||
@ -198,8 +199,14 @@ class manager
|
|||||||
$values = array_values($row);
|
$values = array_values($row);
|
||||||
|
|
||||||
array_walk($keys, array('\phpbb\avatar\manager', 'strip_prefix'), $prefix);
|
array_walk($keys, array('\phpbb\avatar\manager', 'strip_prefix'), $prefix);
|
||||||
|
$row = array_combine($keys, $values);
|
||||||
|
|
||||||
return array_combine($keys, $values);
|
if ($prefix == 'group')
|
||||||
|
{
|
||||||
|
$row['id'] = 'g' . $row['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user