diff options
| author | root | 2014-03-21 11:56:08 +0100 |
|---|---|---|
| committer | root | 2014-03-21 11:56:08 +0100 |
| commit | 08e945b89d649759f40916877f40044657314d9a (patch) | |
| tree | 6f10dcab815df5ba9c2b6878a73835a147efa07e /www/functions/func_download.php | |
| parent | fe561fa106699a0a2e8e20633efed855c33f85c6 (diff) | |
| download | files.iamfabulous.de-08e945b89d649759f40916877f40044657314d9a.tar.gz | |
If you are loged in, now you can download your files.
Diffstat (limited to 'www/functions/func_download.php')
| -rw-r--r-- | www/functions/func_download.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/www/functions/func_download.php b/www/functions/func_download.php index 035e5b4..83db597 100644 --- a/www/functions/func_download.php +++ b/www/functions/func_download.php @@ -2,6 +2,7 @@ /* Expected state: tested, broken. + Works if you are loged in, fatal error if not. */ function start_file_download($user, $path){ @@ -66,15 +67,16 @@ function download_file($db, $file_id){ $uploaddir = "../files/"; $gzip_file = $uploaddir . $file_hash . ".gz"; - $uncompressed_file = readgzfile($gzip_file); - if($uncompressed_file){ + + //if($uncompressed_file){ header("Content-Type: ".$file_mime); header("Content-Disposition: attachment; filename=\"".$file_name."\""); + $uncompressed_file = readgzfile($gzip_file); return true; - } else { - return false; - } + //} else { + // return false; + //} } |
