issue 2643 refactoring make random mid method

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12205 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-11-13 09:22:52 +00:00
parent a77219754e
commit 2c97b4512b
2 changed files with 5 additions and 3 deletions

View file

@ -25,7 +25,6 @@
function getSFTPPath() function getSFTPPath()
{ {
$ftp_info = Context::getRequestVars(); $ftp_info = Context::getRequestVars();
debugPrint($ftp_info);
if(!$ftp_info->ftp_host) if(!$ftp_info->ftp_host)
{ {

View file

@ -1010,11 +1010,14 @@
$randomString = ""; $randomString = "";
for($i=0;$i<4;$i++) for($i=0;$i<4;$i++)
{ {
$doc = rand()%26+65; $case = rand(0, 1);
if($case) $doc = rand(65, 90);
else $doc = rand(97, 122);
$randomString .= chr($doc); $randomString .= chr($doc);
} }
return $randomString.substr($time, -4); return $randomString.substr($time, -2);
} }
/** /**