bah ... went the sheep

git-svn-id: file:///svn/phpbb/trunk@4787 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2004-02-03 02:46:11 +00:00
parent e2862f3ebd
commit 40931f12ba

View file

@ -238,9 +238,12 @@ function marklist(match, status)
trigger_error($user->lang['NO_GROUP']);
}
$name = request_var('group_name', '');
$desc = request_var('group_description', '');
$type = request_var('group_type', 0);
// Did we submit?
if ($update)
{
$group_name = request_var('group_name', '');
$group_desc = request_var('group_description', '');
$group_type = request_var('group_type', 0);
$colour = request_var('group_colour', '');
$rank = request_var('group_rank', 0);
@ -282,9 +285,6 @@ function marklist(match, status)
$avatar_type = $avatar_width = $avatar_height = 0;
}
// Did we submit?
if ($update)
{
if (($avatar && $group_avatar != $avatar) || $delete)
{
avatar_delete($group_avatar);
@ -293,7 +293,7 @@ function marklist(match, status)
// Only set the rank, colour, etc. if it's changed or if we're adding a new
// group. This prevents existing group members being updated if no changes
// were made.
foreach (array('name', 'desc', 'type', 'rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height') as $test)
foreach (array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height') as $test)
{
${'group_' . $test} = ($action == 'add' || (isset($$test) && $$test != ${'group_' . $test})) ? $$test : false;
}