diff options
author | root <martin.mattel@diemattels.at> | 2015-05-29 21:56:08 +0200 |
---|---|---|
committer | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-29 16:59:02 +0100 |
commit | acae208f2fc6b80fbf9af615661e3905f9cab0a0 (patch) | |
tree | 61ac4b858698626ea4fa9c7e541da9563c3991ad /lib/base.php | |
parent | 723f8c8f1ba8c9859ec2d46515dc06e7236f89c0 (diff) | |
download | nextcloud-server-acae208f2fc6b80fbf9af615661e3905f9cab0a0.tar.gz nextcloud-server-acae208f2fc6b80fbf9af615661e3905f9cab0a0.zip |
moved code to /lib/private/tempmanager.php
fix for unit test
some fixes
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/base.php b/lib/base.php index aceac2e53c3..f1f8a0f92ca 100644 --- a/lib/base.php +++ b/lib/base.php @@ -1108,27 +1108,16 @@ class OC { } return true; } -} -if (!function_exists('get_temp_dir')) { /** * Get the temporary dir to store uploaded data * @return null|string Path to the temporary directory or null */ function get_temp_dir() { - if ($temp = ini_get('upload_tmp_dir')) return $temp; - if ($temp = getenv('TMP')) return $temp; - if ($temp = getenv('TEMP')) return $temp; - if ($temp = getenv('TMPDIR')) return $temp; - $temp = tempnam(__FILE__, ''); - if (file_exists($temp)) { - unlink($temp); - return dirname($temp); - } - if ($temp = sys_get_temp_dir()) return $temp; - - return null; + return \OC::$server->getTempManager()->t_get_temp_dir(); } + } + OC::init(); |