diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-12-18 11:19:53 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-12-18 11:19:53 +0100 |
commit | 90b0831cec88763038e241cc4816db204c045e69 (patch) | |
tree | 060da11646fe3d34db61b6b4be9d6d001bb9d090 /lib | |
parent | 6a7dbf3cf24125bfac5089a4fae0a305591410de (diff) | |
download | nextcloud-server-90b0831cec88763038e241cc4816db204c045e69.tar.gz nextcloud-server-90b0831cec88763038e241cc4816db204c045e69.zip |
Use TempManager instead of tmpFolder
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/archive/tar.php | 2 | ||||
-rw-r--r-- | lib/private/files/storage/common.php | 2 | ||||
-rw-r--r-- | lib/private/files/storage/temporary.php | 2 | ||||
-rw-r--r-- | lib/private/helper.php | 12 | ||||
-rw-r--r-- | lib/private/installer.php | 2 |
5 files changed, 4 insertions, 16 deletions
diff --git a/lib/private/archive/tar.php b/lib/private/archive/tar.php index 4448e56850d..4066e1d86c1 100644 --- a/lib/private/archive/tar.php +++ b/lib/private/archive/tar.php @@ -86,7 +86,7 @@ class OC_Archive_TAR extends OC_Archive { * @return bool */ function addFolder($path) { - $tmpBase = OC_Helper::tmpFolder(); + $tmpBase = \OC::$server->getTempManager()->getTemporaryFolder(); if (substr($path, -1, 1) != '/') { $path .= '/'; } diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 091f2edb629..1e30d48f613 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -248,7 +248,7 @@ abstract class Common implements Storage { } public function getLocalFolder($path) { - $baseDir = \OC_Helper::tmpFolder(); + $baseDir = \OC::$server->getTempManager()->getTemporaryFolder(); $this->addLocalFolder($path, $baseDir); return $baseDir; } diff --git a/lib/private/files/storage/temporary.php b/lib/private/files/storage/temporary.php index c8b99a55637..8abc19929b0 100644 --- a/lib/private/files/storage/temporary.php +++ b/lib/private/files/storage/temporary.php @@ -29,7 +29,7 @@ namespace OC\Files\Storage; */ class Temporary extends Local{ public function __construct($arguments = null) { - parent::__construct(array('datadir' => \OC_Helper::tmpFolder())); + parent::__construct(array('datadir' => \OC::$server->getTempManager()->getTemporaryFolder())); } public function cleanUp() { diff --git a/lib/private/helper.php b/lib/private/helper.php index 72282362fe6..556286f3519 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -470,18 +470,6 @@ class OC_Helper { } /** - * create a temporary folder with an unique filename - * - * @return string - * @deprecated Use the TempManager instead - * - * temporary files are automatically cleaned up after the script is finished - */ - public static function tmpFolder() { - return \OC::$server->getTempManager()->getTemporaryFolder(); - } - - /** * Adds a suffix to the name in case the file exists * * @param string $path diff --git a/lib/private/installer.php b/lib/private/installer.php index fa9fc6704df..c188f15718a 100644 --- a/lib/private/installer.php +++ b/lib/private/installer.php @@ -284,7 +284,7 @@ class OC_Installer{ } //extract the archive in a temporary folder - $extractDir=OC_Helper::tmpFolder(); + $extractDir = \OC::$server->getTempManager()->getTemporaryFolder(); OC_Helper::rmdirr($extractDir); mkdir($extractDir); if($archive=OC_Archive::open($path)) { |