[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,9 +424,13 @@ class mcp_warn
{ {
$message = $user->lang['FORM_INVALID']; $message = $user->lang['FORM_INVALID'];
} }
$redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&u=$user_id");
meta_refresh(2, $redirect); if (!empty($message))
trigger_error($message . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>')); {
$redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&amp;mode=user_notes&amp;u=$user_id");
meta_refresh(2, $redirect);
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