phpBB

Code Changes

File: includes/acp/acp_groups.php

  Unmodified   Added   Modified   Removed
Line 80Line 80
			case 'approve':
case 'demote':
case 'promote':

			case 'approve':
case 'demote':
case 'promote':

 
				if (!check_form_key($form_key))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}


				if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);

				if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);

Line 119Line 124
				if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);

				if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);

 
				}
else if (empty($mark_ary))
{
trigger_error($user->lang['NO_USERS'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id), E_USER_WARNING);

				}

if (confirm_box(true))
{
$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];

				}

if (confirm_box(true))
{
$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];

 
					group_user_attributes('default', $group_id, $mark_ary, false, $group_name, $group_row);	
trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
}
else
{
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
'mark' => $mark_ary,
'g' => $group_id,
'i' => $id,
'mode' => $mode,
'action' => $action))
);
}
break;





					if (!sizeof($mark_ary))


			case 'set_default_on_all':
if (confirm_box(true))

					{

					{

 
					$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];


						$start = 0;

do

						$start = 0;

do

Line 157Line 183
							$db->sql_freeresult($result);
}
while ($start);

							$db->sql_freeresult($result);
}
while ($start);

					}
else
{
group_user_attributes('default', $group_id, $mark_ary, false, $group_name, $group_row);
}

 

trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
}


trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
}

Line 175Line 196
						'action'	=> $action))
);
}

						'action'	=> $action))
);
}



 
			break;

case 'deleteusers':

			break;

case 'deleteusers':

 
				if (empty($mark_ary))
{
trigger_error($user->lang['NO_USERS'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id), E_USER_WARNING);
}

			case 'delete':
if (!$group_id)
{

			case 'delete':
if (!$group_id)
{

Line 233Line 257
			break;

case 'addusers':

			break;

case 'addusers':

 
				if (!check_form_key($form_key))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}


				if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);

				if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);

Line 394Line 423
						}
}


						}
}


					// Validate the length of "Maximum number of allowed recipients per private message" setting.
// We use 16777215 as a maximum because it matches MySQL unsigned mediumint maximum value
// which is the lowest amongst DBMSes supported by phpBB3
if ($max_recipients_error = validate_data($submit_ary, array('max_recipients' => array('num', false, 0, 16777215))))









					/*
* Validate the length of "Maximum number of allowed recipients per
* private message" setting. We use 16777215 as a maximum because it matches
* MySQL unsigned mediumint maximum value which is the lowest amongst DBMSes
* supported by phpBB3. Also validate the submitted colour value.
*/
$validation_checks = array(
'max_recipients' => array('num', false, 0, 16777215),
'colour' => array('hex_colour', true),
);

if ($validation_error = validate_data($submit_ary, $validation_checks))

					{
// Replace "error" string with its real, localised form

					{
// Replace "error" string with its real, localised form

						$error = array_merge($error, array_map(array(&$user, 'lang'), $max_recipients_error));

						$error = array_merge($error, $validation_error);

					}

if (!sizeof($error))

					}

if (!sizeof($error))

Line 493Line 530

if (sizeof($error))
{


if (sizeof($error))
{

 
						$error = array_map(array(&$user, 'lang'), $error);

						$group_rank = $submit_ary['rank'];

$group_desc_data = array(

						$group_rank = $submit_ary['rank'];

$group_desc_data = array(

Line 683Line 721
					'U_ACTION'			=> $this->u_action . "&g=$group_id",
'U_BACK' => $this->u_action,
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=list&field=usernames'),

					'U_ACTION'			=> $this->u_action . "&g=$group_id",
'U_BACK' => $this->u_action,
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=list&field=usernames'),

					'U_DEFAULT_ALL'		=> "{$this->u_action}&action=default&g=$group_id",

					'U_DEFAULT_ALL'		=> "{$this->u_action}&action=set_default_on_all&g=$group_id",

				));

// Grab the members

				));

// Grab the members

Line 796Line 834
}

?>

}

?>