diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-18 22:49:29 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-19 15:26:38 +0100 |
commit | d577aad4ac876c1ed29f7b81199f607da581239b (patch) | |
tree | 55bca408402528a7fff2e4d5a0acb5aa7e4ee534 /apps/files_external/lib/swift.php | |
parent | 5fd36d017ecdbce61dcf1c67ae04c8c0be81a4bf (diff) | |
download | nextcloud-server-d577aad4ac876c1ed29f7b81199f607da581239b.tar.gz nextcloud-server-d577aad4ac876c1ed29f7b81199f607da581239b.zip |
Use OCP classes as much as possible in files_external
Diffstat (limited to 'apps/files_external/lib/swift.php')
-rw-r--r-- | apps/files_external/lib/swift.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php index d8107e58fed..6f93f3c84cd 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -310,7 +310,7 @@ class Swift extends \OC\Files\Storage\Common { switch ($mode) { case 'r': case 'rb': - $tmpFile = \OC_Helper::tmpFile(); + $tmpFile = \OCP\Files::tmpFile(); self::$tmpFiles[$tmpFile] = $path; try { $object = $this->getContainer()->getObject($path); @@ -348,7 +348,7 @@ class Swift extends \OC\Files\Storage\Common { } else { $ext = ''; } - $tmpFile = \OC_Helper::tmpFile($ext); + $tmpFile = \OCP\Files::tmpFile($ext); \OC\Files\Stream\Close::registerCallback($tmpFile, array($this, 'writeBack')); if ($this->file_exists($path)) { $source = $this->fopen($path, 'r'); @@ -387,7 +387,7 @@ class Swift extends \OC\Files\Storage\Common { $object->saveMetadata($metadata); return true; } else { - $mimeType = \OC_Helper::getMimetypeDetector()->detectPath($path); + $mimeType = \OC::$server->getMimeTypeDetector()->detectPath($path); $customHeaders = array('content-type' => $mimeType); $metadataHeaders = DataObject::stockHeaders($metadata); $allHeaders = $customHeaders + $metadataHeaders; |