cvs: pear /HTTP_Upload Upload.php

From: Date: Tue, 11 Sep 2001 01:32:52 +0000
Subject: cvs: pear /HTTP_Upload Upload.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-830@lists.php.net to get a copy of this message
sterling Mon Sep 10 21:32:52 2001 EDT Modified files: /pear/HTTP_Upload Upload.php Log: avoid reseeding Index: pear/HTTP_Upload/Upload.php diff -u pear/HTTP_Upload/Upload.php:1.3 pear/HTTP_Upload/Upload.php:1.4 --- pear/HTTP_Upload/Upload.php:1.3 Tue Aug 14 21:25:27 2001 +++ pear/HTTP_Upload/Upload.php Mon Sep 10 21:32:52 2001 @@ -7,7 +7,7 @@ // // ********************************************** // -// $Id: Upload.php,v 1.3 2001/08/15 01:25:27 cox Exp $ +// $Id: Upload.php,v 1.4 2001/09/11 01:32:52 sterling Exp $ /** * Pear File Uploader class. Easy and secure managment of files @@ -201,6 +201,8 @@ class HTTP_Upload_File extends HTTP_Upload_Error { + var $_seeded = 0; + /** * Assoc array with file properties * @var array @@ -274,7 +276,11 @@ */ function nameToUniq () { - srand((double) microtime() * 1000000); + if (! $this->_seeded) { + srand((double) microtime() * 1000000); + $this->_seeded = 1; + } + $uniq = uniqid(rand()); return $uniq . '.' . $this->nameToSafe($this->upload['ext'],10); } @@ -416,4 +422,4 @@ return $this->errorCode($this->upload['error']); } } -?> \ No newline at end of file +?>

« previous php.pear.cvs (#830) next »