another fix for download script to report 404 Not found when no file is supplied for it

This commit is contained in:
Pavol Zibrita 2011-06-10 21:14:11 +02:00
parent 929462d4a5
commit 6921fd4c21

View file

@ -70,6 +70,10 @@ function update_count_of_downloads($file) {
}
if(!isset($_GET['file']) ) {
header('HTTP/1.0 404 Not Found');
die(1);
}
$file = $_GET['file'];
if(!isset($_SERVER['HTTP_RANGE']) ) {
update_count_of_downloads($file) ;