diff options
author | Björn Schießle <schiessle@owncloud.com> | 2012-10-05 12:01:18 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2012-10-05 12:01:18 +0200 |
commit | 72a48ca35eb99be1b3fae8bd9843dabcd7ff1a11 (patch) | |
tree | a607401fd55371121d76f7c95ab3a09fb61728e0 /apps/files_sharing | |
parent | dcad7aec82e641158a6b1a5c690714ea9d56c3f8 (diff) | |
download | nextcloud-server-72a48ca35eb99be1b3fae8bd9843dabcd7ff1a11.tar.gz nextcloud-server-72a48ca35eb99be1b3fae8bd9843dabcd7ff1a11.zip |
fix download of single publically shared files.
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/public.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 2d6437d819f..6aab650aa7f 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -82,7 +82,12 @@ if (isset($_GET['file']) || isset($_GET['dir'])) { } // Download the file if (isset($_GET['download'])) { - OC_Files::get($path, '', $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + if (isset($_GET['dir'])) { + OC_Files::get($path, '', $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } else { + OC_Files::get("", $path, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } + } else { OCP\Util::addStyle('files_sharing', 'public'); OCP\Util::addScript('files_sharing', 'public'); |