diff options
Diffstat (limited to 'phpBB/includes/ucp/ucp_profile.php')
| -rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 17 | 
1 files changed, 8 insertions, 9 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index c099e3b3fa..4572dfd25d 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -30,12 +30,13 @@ class ucp_profile  	function main($id, $mode)  	{  		global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx; +		global $request;  		$user->add_lang('posting'); -		$preview	= (!empty($_POST['preview'])) ? true : false; -		$submit		= (!empty($_POST['submit'])) ? true : false; -		$delete		= (!empty($_POST['delete'])) ? true : false; +		$preview	= $request->variable('preview', false, false, phpbb_request_interface::POST); +		$submit		= $request->variable('submit', false, false, phpbb_request_interface::POST); +		$delete		= $request->variable('delete', false, false, phpbb_request_interface::POST);  		$error = $data = array();  		$s_hidden_fields = ''; @@ -238,7 +239,7 @@ class ucp_profile  					}  					// Replace "error" strings with their real, localised form -					$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); +					$error = array_map(array($user, 'lang'), $error);  				}  				$template->assign_vars(array( @@ -385,7 +386,7 @@ class ucp_profile  					}  					// Replace "error" strings with their real, localised form -					$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); +					$error = array_map(array($user, 'lang'), $error);  				}  				if ($config['allow_birthdays']) @@ -510,7 +511,7 @@ class ucp_profile  					}  					// Replace "error" strings with their real, localised form -					$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); +					$error = array_map(array($user, 'lang'), $error);  				}  				$signature_preview = ''; @@ -581,7 +582,7 @@ class ucp_profile  						$error[] = 'FORM_INVALID';  					}  					// Replace "error" strings with their real, localised form -					$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); +					$error = array_map(array($user, 'lang'), $error);  				}  				if (!$config['allow_avatar'] && $user->data['user_avatar_type']) @@ -642,5 +643,3 @@ class ucp_profile  		$this->page_title = 'UCP_PROFILE_' . strtoupper($mode);  	}  } - -?>
\ No newline at end of file  | 
