From 06f017badb64dd71318165467088cb966da1e829 Mon Sep 17 00:00:00 2001 From: sergem Date: Tue, 16 Mar 2010 15:39:00 +0200 Subject: [PATCH] Added a random portion to the temporary filename in file uploads, since uploads failed if more than one file happened to upload in the same second due to a naming conflict --- ktwebservice/KTUploadManager.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ktwebservice/KTUploadManager.inc.php b/ktwebservice/KTUploadManager.inc.php index 46daf59..54dde77 100644 --- a/ktwebservice/KTUploadManager.inc.php +++ b/ktwebservice/KTUploadManager.inc.php @@ -201,7 +201,7 @@ class KTUploadManager { $filename=basename($filename); $now=date('Y-m-d H:i:s'); - $now_str=date('YmdHis'); + $now_str=date('YmdHis') + rand(0, 32768); // Ensure the temp directory exists otherwise an error is thrown. if (realpath($this->temp_dir) == FALSE) { -- libgit2 0.21.4