diff options
Diffstat (limited to 'phpBB/includes/ucp/ucp_groups.php')
| -rw-r--r-- | phpBB/includes/ucp/ucp_groups.php | 30 | 
1 files changed, 16 insertions, 14 deletions
| diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index d62dbb1866..9652986cf2 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -2,9 +2,8 @@  /**  *  * @package ucp -* @version $Id$  * @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2  *  */ @@ -28,14 +27,15 @@ class ucp_groups  	{  		global $config, $phpbb_root_path, $phpEx;  		global $db, $user, $auth, $cache, $template; +		global $request;  		$user->add_lang('groups');  		$return_page = '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '">', '</a>');  		$mark_ary	= request_var('mark', array(0)); -		$submit		= (!empty($_POST['submit'])) ? true : false; -		$delete		= (!empty($_POST['delete'])) ? true : false; +		$submit		= $request->variable('submit', false, false, phpbb_request_interface::POST); +		$delete		= $request->variable('delete', false, false, phpbb_request_interface::POST);  		$error = $data = array();  		switch ($mode) @@ -513,7 +513,8 @@ class ucp_groups  							$data['height']		= request_var('height', '');  							$delete				= request_var('delete', ''); -							if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink']) +							$uploadfile = $request->file('uploadfile'); +							if (!empty($uploadfile['tmp_name']) || $data['uploadurl'] || $data['remotelink'])  							{  								// Avatar stuff  								$var_ary = array( @@ -527,7 +528,7 @@ class ucp_groups  								{  									$data['user_id'] = "g$group_id"; -									if ((!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl']) && $can_upload) +									if ((!empty($uploadfile['tmp_name']) || $data['uploadurl']) && $can_upload)  									{  										list($submit_ary['avatar_type'], $submit_ary['avatar'], $submit_ary['avatar_width'], $submit_ary['avatar_height']) = avatar_upload($data, $error);  									} @@ -560,7 +561,7 @@ class ucp_groups  								{  									if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])  									{ -										$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']); +										$error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']);  									}  								} @@ -570,7 +571,7 @@ class ucp_groups  									{  										if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])  										{ -											$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']); +											$error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']);  										}  									}  								} @@ -731,7 +732,7 @@ class ucp_groups  							'U_SWATCH'			=> append_sid("{$phpbb_root_path}adm/swatch.$phpEx", 'form=ucp&name=group_colour'),  							'S_UCP_ACTION'		=> $this->u_action . "&action=$action&g=$group_id", -							'L_AVATAR_EXPLAIN'	=> sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024), +							'L_AVATAR_EXPLAIN'	=> phpbb_avatar_explanation_string(),  						));  					break; @@ -844,11 +845,13 @@ class ucp_groups  							$s_action_options .= '<option value="' . $option . '">' . $user->lang['GROUP_' . $lang] . '</option>';  						} +						$base_url = $this->u_action . "&action=$action&g=$group_id"; +						phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total_members, $config['topics_per_page'], $start); +  						$template->assign_vars(array(  							'S_LIST'			=> true,  							'S_ACTION_OPTIONS'	=> $s_action_options, -							'S_ON_PAGE'			=> on_page($total_members, $config['topics_per_page'], $start), -							'PAGINATION'		=> generate_pagination($this->u_action . "&action=$action&g=$group_id", $total_members, $config['topics_per_page'], $start), +							'S_ON_PAGE'			=> phpbb_on_page($template, $user, $base_url, $total_members, $config['topics_per_page'], $start),  							'U_ACTION'			=> $this->u_action . "&g=$group_id",  							'S_UCP_ACTION'		=> $this->u_action . "&g=$group_id", @@ -1067,7 +1070,8 @@ class ucp_groups  								'mode'		=> $mode,  								'action'	=> $action  							); -							confirm_box(false, sprintf($user->lang['GROUP_CONFIRM_ADD_USER' . ((sizeof($name_ary) == 1) ? '' : 'S')], implode(', ', $name_ary)), build_hidden_fields($s_hidden_fields)); + +							confirm_box(false, $user->lang('GROUP_CONFIRM_ADD_USERS', sizeof($name_ary), implode($user->lang['COMMA_SEPARATOR'], $name_ary)), build_hidden_fields($s_hidden_fields));  						}  						trigger_error($user->lang['NO_USERS_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&action=list&g=' . $group_id . '">', '</a>')); @@ -1109,5 +1113,3 @@ class ucp_groups  		$this->tpl_name = 'ucp_groups_' . $mode;  	}  } - -?>
\ No newline at end of file | 
