[ticket/9549] Only add group to legend/teampage when the checkbox is checked.

The checkbox for the teampage was also missing from the template file.

PHPBB3-9549
This commit is contained in:
Joas Schilling 2011-02-17 23:53:05 +01:00
parent f908a01661
commit d9f092a18b
2 changed files with 6 additions and 2 deletions

View file

@ -70,6 +70,10 @@
<dt><label for="group_legend">{L_GROUP_LEGEND}:</label></dt>
<dd><input name="group_legend" type="checkbox" value="1" class="radio" id="group_legend"{GROUP_LEGEND} /></dd>
</dl>
<dl>
<dt><label for="group_teampage">{L_GROUP_TEAMPAGE}:</label></dt>
<dd><input name="group_teampage" type="checkbox" value="1" class="radio" id="group_teampage"{GROUP_TEAMPAGE} /></dd>
</dl>
<dl>
<dt><label for="group_receive_pm">{L_GROUP_RECEIVE_PM}:</label><br /><span>{L_GROUP_RECEIVE_PM_EXPLAIN}</span></dt>
<dd><input name="group_receive_pm" type="checkbox" value="1" class="radio" id="group_receive_pm"{GROUP_RECEIVE_PM} /></dd>

View file

@ -2506,7 +2506,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
$current_teampage = $teampage->get_group_value($group_id);
}
if (isset($group_attributes['group_legend']))
if (!empty($group_attributes['group_legend']))
{
if (($group_id && ($current_legend == phpbb_group_positions::GROUP_DISABLED)) || !$group_id)
{
@ -2530,7 +2530,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
$group_attributes['group_legend'] = phpbb_group_positions::GROUP_DISABLED;
}
if (isset($group_attributes['group_teampage']))
if (!empty($group_attributes['group_teampage']))
{
if (($group_id && ($current_teampage == phpbb_group_positions::GROUP_DISABLED)) || !$group_id)
{