aboutsummaryrefslogtreecommitdiffstats
path: root/lib/db.php
diff options
context:
space:
mode:
authorHendrik Langer <hendrik.langer@gmx.de>2011-10-19 23:38:35 +0200
committerHendrik Langer <hendrik.langer@gmx.de>2011-10-19 23:38:35 +0200
commit466b41c36bf7093cdde9d2856eb520503f52640c (patch)
tree6456918f3f142f0ade1370ffb948fa9ffc59a267 /lib/db.php
parentda8d32ae38acdab576a30ca56b30579f427c780d (diff)
downloadnextcloud-server-466b41c36bf7093cdde9d2856eb520503f52640c.tar.gz
nextcloud-server-466b41c36bf7093cdde9d2856eb520503f52640c.zip
Don't use sys_get_temp_dir(), as it reports the wrong path in restricted environments
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/db.php b/lib/db.php
index bcfda4592f2..44be619fde1 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -285,7 +285,7 @@ class OC_DB {
$content = file_get_contents( $file );
// Make changes and save them to a temporary file
- $file2 = tempnam( sys_get_temp_dir(), 'oc_db_scheme_' );
+ $file2 = tempnam( get_temp_dir(), 'oc_db_scheme_' );
$content = str_replace( '*dbname*', $CONFIG_DBNAME, $content );
$content = str_replace( '*dbprefix*', $CONFIG_DBTABLEPREFIX, $content );
if( $CONFIG_DBTYPE == 'pgsql' ){ //mysql support it too but sqlite don't
@@ -392,7 +392,7 @@ class OC_DB {
$content = file_get_contents( $file );
// Make changes and save them to a temporary file
- $file2 = tempnam( sys_get_temp_dir(), 'oc_db_scheme_' );
+ $file2 = tempnam( get_temp_dir(), 'oc_db_scheme_' );
$content = str_replace( '*dbname*', $CONFIG_DBNAME, $content );
$content = str_replace( '*dbprefix*', $CONFIG_DBTABLEPREFIX, $content );
file_put_contents( $file2, $content );