[ticket/9492] Ensure to update all avatar values when the avatar is changed

PHPBB3-9492
This commit is contained in:
Joas Schilling 2013-01-17 14:43:00 +01:00
parent 64c27013d4
commit bd87b06858
2 changed files with 2 additions and 2 deletions

View file

@ -439,7 +439,7 @@ class acp_groups
foreach ($test_variables as $test => $type) foreach ($test_variables as $test => $type)
{ {
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test] || in_array($test, $set_attributes))) if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test] || isset($group_attributes['group_avatar']) && strpos($test, 'avatar') === 0 || in_array($test, $set_attributes)))
{ {
settype($submit_ary[$test], $type); settype($submit_ary[$test], $type);
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test]; $group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];

View file

@ -618,7 +618,7 @@ class ucp_groups
foreach ($test_variables as $test => $type) foreach ($test_variables as $test => $type)
{ {
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test])) if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test] || isset($group_attributes['group_avatar']) && strpos($test, 'avatar') === 0))
{ {
settype($submit_ary[$test], $type); settype($submit_ary[$test], $type);
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test]; $group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];