diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2010-04-22 07:25:28 -0400 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-05-16 19:23:54 +0200 |
commit | 82ce29ac5855f13e803556b14960af3b759dc14b (patch) | |
tree | 77522b51c5a36b6faa9d2db1a7f9aa91beea536f /phpBB/includes/functions.php | |
parent | cb3cf71805246bc2ce3b386a5d70e76dbe1dff0e (diff) | |
download | forums-82ce29ac5855f13e803556b14960af3b759dc14b.tar forums-82ce29ac5855f13e803556b14960af3b759dc14b.tar.gz forums-82ce29ac5855f13e803556b14960af3b759dc14b.tar.bz2 forums-82ce29ac5855f13e803556b14960af3b759dc14b.tar.xz forums-82ce29ac5855f13e803556b14960af3b759dc14b.zip |
[ticket/7782] Send 404 HTTP code when a nonexistent user/forum/topic is requested.
PHPBB3-7782
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4f52c7c2ce..3886640b41 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3628,6 +3628,11 @@ function msg_handler($errno, $msg_text, $errfile, $errline) $user->setup(); } + if ($msg_text == 'NO_FORUM' || $msg_text == 'NO_TOPIC' || $msg_text == 'NO_USER') + { + header("HTTP/1.x 404 Not Found"); + } + $msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text; $msg_title = (!isset($msg_title)) ? $user->lang['INFORMATION'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title); |