diff options
author | dratini0 <dratini0@gmail.com> | 2014-12-30 22:36:13 +0100 |
---|---|---|
committer | dratini0 <dratini0@gmail.com> | 2014-12-30 22:36:13 +0100 |
commit | 31970ee7409ff2ed303b728ea4fd6f8d10302649 (patch) | |
tree | 4c719af2a2a45a0938a58406ccfcc4c1b04c80ee /lib/private/files.php | |
parent | f2075f803fc59918cc20071cf174d6b5f81f5eed (diff) | |
download | nextcloud-server-31970ee7409ff2ed303b728ea4fd6f8d10302649.tar.gz nextcloud-server-31970ee7409ff2ed303b728ea4fd6f8d10302649.zip |
removed a little duplication
Diffstat (limited to 'lib/private/files.php')
-rw-r--r-- | lib/private/files.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/private/files.php b/lib/private/files.php index d42ab3d1852..496ba1baff0 100644 --- a/lib/private/files.php +++ b/lib/private/files.php @@ -161,12 +161,11 @@ class OC_Files { * @param false|string $filename */ private static function addSendfileHeader($filename) { + $filename = \OC\Files\Filesystem::getLocalFile($filename); if (isset($_SERVER['MOD_X_SENDFILE_ENABLED'])) { - $filename = \OC\Files\Filesystem::getLocalFile($filename); header("X-Sendfile: " . $filename); } if (isset($_SERVER['MOD_X_SENDFILE2_ENABLED'])) { - $filename = \OC\Files\Filesystem::getLocalFile($filename); if (isset($_SERVER['HTTP_RANGE']) && preg_match("/^bytes=([0-9]+)-([0-9]*)$/", $_SERVER['HTTP_RANGE'], $range)) { $filelength = filesize($filename); @@ -182,7 +181,6 @@ class OC_Files { } if (isset($_SERVER['MOD_X_ACCEL_REDIRECT_ENABLED'])) { - $filename = \OC\Files\Filesystem::getLocalFile($filename); header("X-Accel-Redirect: " . $filename); } } |