]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - extlib/get_temp_dir.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / extlib / get_temp_dir.php
diff --git a/extlib/get_temp_dir.php b/extlib/get_temp_dir.php
deleted file mode 100644 (file)
index 4ec96e5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-if ( !function_exists('sys_get_temp_dir')) {
-       function sys_get_temp_dir() {
-               if (!empty($_ENV['TMP'])) { return realpath($_ENV['TMP']); }
-               if (!empty($_ENV['TMPDIR'])) { return realpath( $_ENV['TMPDIR']); }
-               if (!empty($_ENV['TEMP'])) { return realpath( $_ENV['TEMP']); }
-               $tempfile=tempnam(uniqid(rand(),TRUE),'');
-               if (file_exists($tempfile)) {
-                       unlink($tempfile);
-               }
-               return realpath(dirname($tempfile));
-       }
-}
-?>