From 655589d407100c15f3bbb00e8a0749495017bf28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Thu, 13 Feb 2014 18:03:38 +0100 Subject: [PATCH] Duplicate --- base.php | 7 +++++++ epubfs.php | 7 ------- fetch.php | 7 ------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/base.php b/base.php index 96e074d..a2c8331 100644 --- a/base.php +++ b/base.php @@ -46,6 +46,13 @@ function getQueryString () { return ""; } +function notFound () { + header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); + header("Status: 404 Not Found"); + + $_SERVER['REDIRECT_STATUS'] = 404; +} + function getURLParam ($name, $default = NULL) { if (!empty ($_GET) && isset($_GET[$name]) && $_GET[$name] != "") { return $_GET[$name]; diff --git a/epubfs.php b/epubfs.php index baecf9c..309a42f 100644 --- a/epubfs.php +++ b/epubfs.php @@ -5,13 +5,6 @@ require_once ("base.php"); require_once ("book.php"); require_once ("resources/php-epub-meta/epub.php"); -function notFound () { - header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); - header("Status: 404 Not Found"); - - $_SERVER['REDIRECT_STATUS'] = 404; -} - function getComponentContent ($book, $component, $add) { $data = $book->component ($component); diff --git a/fetch.php b/fetch.php index 1d15e3c..6386590 100644 --- a/fetch.php +++ b/fetch.php @@ -10,13 +10,6 @@ require_once ("book.php"); require_once ("data.php"); -function notFound () { - header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); - header("Status: 404 Not Found"); - - $_SERVER['REDIRECT_STATUS'] = 404; -} - global $config; if ($config ['cops_fetch_protect'] == "1") {