diff options
| author | Horus3 | 2014-04-02 18:19:15 +0200 |
|---|---|---|
| committer | Horus3 | 2014-04-02 18:19:15 +0200 |
| commit | f4e1c90897d3d9a2f139fc604401694df273edc7 (patch) | |
| tree | 9136cb612682fdbd46b81e18ce740b3c25d0b40b /www | |
| parent | 68b22caf30f9be7451c3f1473827e65737b1c1f7 (diff) | |
| download | files.iamfabulous.de-f4e1c90897d3d9a2f139fc604401694df273edc7.tar.gz | |
Displays images directly in the browser.
Diffstat (limited to 'www')
| -rw-r--r-- | www/functions/func_download.php | 5 | ||||
| -rwxr-xr-x | www/functions/func_invite.php | 1 | ||||
| -rwxr-xr-x | www/invite.php | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/www/functions/func_download.php b/www/functions/func_download.php index 64c5d90..d9be089 100644 --- a/www/functions/func_download.php +++ b/www/functions/func_download.php @@ -103,7 +103,10 @@ function download_file($db, $file_id){ //TODO: buffer output, print if reading == true header("Content-Type: ".$file_mime); - header("Content-Disposition: attachment; filename=\"".$file_name."\""); + + if(!preg_match("/^image\/.+/", $file_mime)){ + header("Content-Disposition: attachment; filename=\"".$file_name."\""); + } header("Content-Length: ".$file_size); set_time_limit(0); $uncompressed_file = readgzfile($gzip_file); diff --git a/www/functions/func_invite.php b/www/functions/func_invite.php index cf123cf..d7613d5 100755 --- a/www/functions/func_invite.php +++ b/www/functions/func_invite.php @@ -51,6 +51,7 @@ function invite($db){ $subject="Welcome, you were invited to the new virtual filesystem.\nYour key is " . $key . "\nVisit files.iamfabulous.de/register to complete your registration."; + // Doesn't work with GMX or Web.de atm. mail($email, "Invite", $subject, "From: mail@iamfabulous.de"); return INVITE_SUCCESSFULL; diff --git a/www/invite.php b/www/invite.php index 02f1617..6979261 100755 --- a/www/invite.php +++ b/www/invite.php @@ -8,7 +8,7 @@ database: Specifies that the request could not be fullfilled due to a database error. No mail is send - succuss: Specifies that the request was successfull. The new user has been invited. + success: Specifies that the request was successfull. The new user has been invited. ================================================================================================================================================== */ |
