summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php8
-rw-r--r--lib/private/preview/office.php2
2 files changed, 1 insertions, 9 deletions
diff --git a/lib/base.php b/lib/base.php
index 5f8a7ed0f19..1e353df86dd 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -1116,14 +1116,6 @@ class OC {
return true;
}
- /**
- * Get the temporary dir to store uploaded data
- * @return null|string Path to the temporary directory or null
- */
- function get_temp_dir() {
- return \OC::$server->getTempManager()->t_get_temp_dir();
- }
-
}
diff --git a/lib/private/preview/office.php b/lib/private/preview/office.php
index 30398147aa6..ac6b4afa0cc 100644
--- a/lib/private/preview/office.php
+++ b/lib/private/preview/office.php
@@ -36,7 +36,7 @@ abstract class Office extends Provider {
$absPath = $fileview->toTmpFile($path);
- $tmpDir = get_temp_dir();
+ $tmpDir = \OC::$server->getTempManager()->getTempBaseDir();
$defaultParameters = ' -env:UserInstallation=file://' . escapeshellarg($tmpDir . '/owncloud-' . \OC_Util::getInstanceId() . '/') . ' --headless --nologo --nofirststartwizard --invisible --norestore --convert-to pdf --outdir ';
$clParameters = \OCP\Config::getSystemValue('preview_office_cl_parameters', $defaultParameters);