diff --git a/classes/script_start.php b/classes/script_start.php index c2d5ef42..c17a74c4 100644 --- a/classes/script_start.php +++ b/classes/script_start.php @@ -380,7 +380,7 @@ function authorize($Ajax = false) { Old versions of Internet Explorer choke when downloading binary files over HTTPS with disabled cache. Define the following constant in files that handle file downloads */ -if (!defined('IE_WORKAROUND_NO_CACHE_HEADERS')) { +if (!defined('SKIP_NO_CACHE_HEADERS')) { header('Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0'); header('Pragma: no-cache'); } diff --git a/image.php b/image.php index 43ceedbe..a6ba8797 100644 --- a/image.php +++ b/image.php @@ -2,8 +2,8 @@ // Functions and headers needed by the image proxy error_reporting(E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR); -if (isset($_SERVER['http_if_modified_since'])) { - header("Status: 304 Not Modified"); +if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { + header("HTTP/1.1 304 Not Modified"); die(); } @@ -97,5 +97,6 @@ function image_height($Type, $Data) { } } +define('SKIP_NO_CACHE_HEADERS', 1); require('classes/script_start.php'); // script_start contains all we need and includes sections/image/index.php ?> diff --git a/sections/artist/download.php b/sections/artist/download.php index 083f3f23..9835bf08 100644 --- a/sections/artist/download.php +++ b/sections/artist/download.php @@ -180,5 +180,5 @@ Users::update_site_options($LoggedUser['ID'], array('Collector' => $Settings)); } -define('IE_WORKAROUND_NO_CACHE_HEADERS', 1); +define('SKIP_NO_CACHE_HEADERS', 1); ?> diff --git a/sections/collages/download.php b/sections/collages/download.php index 42562c2f..2cb392ff 100644 --- a/sections/collages/download.php +++ b/sections/collages/download.php @@ -164,5 +164,5 @@ Users::update_site_options($LoggedUser['ID'], array('Collector' => $Settings)); } -define('IE_WORKAROUND_NO_CACHE_HEADERS', 1); +define('SKIP_NO_CACHE_HEADERS', 1); ?> diff --git a/sections/torrents/download.php b/sections/torrents/download.php index 73eafde8..74a7b9fa 100644 --- a/sections/torrents/download.php +++ b/sections/torrents/download.php @@ -183,4 +183,4 @@ echo TorrentsDL::get_file($Contents, ANNOUNCE_URL."/$TorrentPass/announce"); -define('IE_WORKAROUND_NO_CACHE_HEADERS', 1); +define('SKIP_NO_CACHE_HEADERS', 1); diff --git a/sections/torrents/redownload.php b/sections/torrents/redownload.php index 6fa9bfb0..7015900d 100644 --- a/sections/torrents/redownload.php +++ b/sections/torrents/redownload.php @@ -88,4 +88,4 @@ } $Collector->finalize(false); -define('IE_WORKAROUND_NO_CACHE_HEADERS', 1); +define('SKIP_NO_CACHE_HEADERS', 1); diff --git a/sections/upload/generate_extra_torrents.php b/sections/upload/generate_extra_torrents.php index 9ec25979..d54297c8 100644 --- a/sections/upload/generate_extra_torrents.php +++ b/sections/upload/generate_extra_torrents.php @@ -22,7 +22,7 @@ foreach ($ExtraFileList as $ExtraFile) { list($ExtraSize, $ExtraName) = $ExtraFile; - check_file($ExtraType, $ExtraName); + check_file($Type, $ExtraName); // Make sure the file name is not too long if (mb_strlen($ExtraName, 'UTF-8') + mb_strlen($ExtraDirName, 'UTF-8') + 1 > MAX_FILENAME_LENGTH) { diff --git a/sections/user/community_stats.php b/sections/user/community_stats.php index 7effd7fd..35b1f931 100644 --- a/sections/user/community_stats.php +++ b/sections/user/community_stats.php @@ -62,38 +62,40 @@