1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-07 23:16:13 +02:00

[ticket/11525] Prefix id parameter with 'g' again when its a group avatar

PHPBB3-11525
This commit is contained in:
Joas Schilling 2013-11-10 23:07:07 +01:00
parent 47f2caff6b
commit aa84f7de04

View File

@ -183,8 +183,9 @@ class manager
* @param array $row User data or group data
* @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
* stripped from the preceding "user_" or "group_"
* @return array User or group data with keys that have been
* 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 = '')
{
@ -198,8 +199,14 @@ class manager
$values = array_values($row);
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;
}
/**