aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2011-08-02 16:50:17 +0200
committerJoas Schilling <nickvergessen@gmx.de>2011-08-02 16:56:21 +0200
commitc2866f52453ac8bdfcdde6b541bbba60f1c71d02 (patch)
tree15542a1c917a9e96727ab90d9a235585dcf8aab5
parent124b8a92ec5e0ce6acf01b52a9825f48944bd2a1 (diff)
downloadforums-c2866f52453ac8bdfcdde6b541bbba60f1c71d02.tar
forums-c2866f52453ac8bdfcdde6b541bbba60f1c71d02.tar.gz
forums-c2866f52453ac8bdfcdde6b541bbba60f1c71d02.tar.bz2
forums-c2866f52453ac8bdfcdde6b541bbba60f1c71d02.tar.xz
forums-c2866f52453ac8bdfcdde6b541bbba60f1c71d02.zip
[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
-rw-r--r--phpBB/includes/acp/acp_groups.php5
1 files changed, 4 insertions, 1 deletions
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];