diff options
author | n-aleha <nick_aleha@myway.com> | 2014-05-25 22:00:37 +0300 |
---|---|---|
committer | n-aleha <nick_aleha@myway.com> | 2014-05-25 22:00:37 +0300 |
commit | 589ad564cc194bdca9cdada333ec60b2fa6a214b (patch) | |
tree | 7d67cfaf664de1a69879b7ed7bc47327022d0fef | |
parent | 7a6867d54edc2fda9b48f88cd4a49b096fbef644 (diff) | |
download | forums-589ad564cc194bdca9cdada333ec60b2fa6a214b.tar forums-589ad564cc194bdca9cdada333ec60b2fa6a214b.tar.gz forums-589ad564cc194bdca9cdada333ec60b2fa6a214b.tar.bz2 forums-589ad564cc194bdca9cdada333ec60b2fa6a214b.tar.xz forums-589ad564cc194bdca9cdada333ec60b2fa6a214b.zip |
[ticket/12583] Redirect only on non-empty $message
PHPBB3-12583
-rw-r--r-- | phpBB/includes/mcp/mcp_warn.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index 0ef9200beb..df55c44134 100644 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -316,9 +316,13 @@ class mcp_warn { $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); - trigger_error($message . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>')); + + if (!empty($message)) + { + $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&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 |