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

PHPBB3-12583
This commit is contained in:
n-aleha 2014-05-25 22:00:37 +03:00
parent 7a6867d54e
commit 589ad564cc

View file

@ -316,9 +316,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>'));
}
} }
// OK, they didn't submit a warning so lets build the page for them to do so // OK, they didn't submit a warning so lets build the page for them to do so