[ticket/12584] Redirect only on non-empty $message

PHPBB3-12584
This commit is contained in:
n-aleha 2014-05-25 22:05:34 +03:00
parent fdb53b23fb
commit 62cb7e0c10

View file

@ -424,10 +424,14 @@ class mcp_warn
{ {
$message = $user->lang['FORM_INVALID']; $message = $user->lang['FORM_INVALID'];
} }
if (!empty($message))
{
$redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&u=$user_id"); $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&u=$user_id");
meta_refresh(2, $redirect); meta_refresh(2, $redirect);
trigger_error($message . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>')); trigger_error($message . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
} }
}
// Generate the appropriate user information for the user we are looking at // Generate the appropriate user information for the user we are looking at
if (!function_exists('get_user_rank')) if (!function_exists('get_user_rank'))