]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
sys_get_temp_dir was added in PHP 5 >= 5.2.1
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 4 Sep 2015 20:24:01 +0000 (22:24 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 4 Sep 2015 20:24:01 +0000 (22:24 +0200)
Our requirements are higher than that, so let's just remove the workaround

extlib/get_temp_dir.php [deleted file]

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));
-       }
-}
-?>