From 710d66457b9725c92b4a4166de99305203af0d7f Mon Sep 17 00:00:00 2001 From: 8chan Date: Wed, 31 Dec 2014 22:28:00 -0800 Subject: [PATCH 01/16] Home and Return links in 404.php --- 404.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/404.php b/404.php index b28dbd25..b660857f 100644 --- a/404.php +++ b/404.php @@ -26,9 +26,16 @@ if (count($files) == 0) { $errorimage = $files[array_rand($files)]; } +if (preg_match('!'.$config['board_regex'].'/'.$config['dir']['res'].'\d+\.html!u', $_SERVER['REQUEST_URI'])) { + $return_link = '[ Return ]'; +} else { + $return_link = ''; +} + $page = <<

+

[ Home ]{$return_link}