summaryrefslogtreecommitdiffstats
path: root/apps/files/download.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-10 13:18:36 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-10 13:18:36 +0200
commitaaa1b733642c41821a53bc6d04fab246bfe7f1e6 (patch)
treed5eb087401acb4591f176a87c01f276f42a307af /apps/files/download.php
parentc88c54bbb054fe2d79b3a93604989d527b5dd444 (diff)
downloadnextcloud-server-aaa1b733642c41821a53bc6d04fab246bfe7f1e6.tar.gz
nextcloud-server-aaa1b733642c41821a53bc6d04fab246bfe7f1e6.zip
don't use depricated OC_Filesystem
Diffstat (limited to 'apps/files/download.php')
-rw-r--r--apps/files/download.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files/download.php b/apps/files/download.php
index ff6aefbbe0f..b00a50a0452 100644
--- a/apps/files/download.php
+++ b/apps/files/download.php
@@ -29,7 +29,7 @@ OCP\User::checkLoggedIn();
$filename = $_GET["file"];
-if(!OC_Filesystem::file_exists($filename)) {
+if(!\OC\Files\Filesystem::file_exists($filename)) {
header("HTTP/1.0 404 Not Found");
$tmpl = new OCP\Template( '', '404', 'guest' );
$tmpl->assign('file',$filename);
@@ -37,12 +37,12 @@ if(!OC_Filesystem::file_exists($filename)) {
exit;
}
-$ftype=OC_Filesystem::getMimeType( $filename );
+$ftype=\OC\Files\Filesystem::getMimeType( $filename );
header('Content-Type:'.$ftype);
header('Content-Disposition: attachment; filename="'.basename($filename).'"');
OCP\Response::disableCaching();
-header('Content-Length: '.OC_Filesystem::filesize($filename));
+header('Content-Length: '.\OC\Files\Filesystem::filesize($filename));
@ob_end_clean();
-OC_Filesystem::readfile( $filename );
+\OC\Files\Filesystem::readfile( $filename );