From c2866f52453ac8bdfcdde6b541bbba60f1c71d02 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 2 Aug 2011 16:50:17 +0200 Subject: [ticket/10300] Always set group attributes for teampage and legend The code in acp_groups.php removes unchanged attributes from the group_attributes array, to prevent issues with reapplying avatar/rank and more. This code causes problems with the new teampage/legend feature, because when the attribute is not set, the group is removed from the feature. Therefore I added an array with the keys that need to be set, when calling the function. PHPBB3-10300 --- phpBB/includes/acp/acp_groups.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'phpBB/includes') diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index dde556c19e..221dea2345 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -415,6 +415,9 @@ class acp_groups // 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. + // However there are some attributes that need to be set everytime, + // otherwise the group gets removed from the feature. + $set_attributes = array('legend', 'teampage'); $group_attributes = array(); $test_variables = array( @@ -435,7 +438,7 @@ class acp_groups 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] || in_array($test, $set_attributes))) { settype($submit_ary[$test], $type); $group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test]; -- cgit v1.2.1