mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Replace case_id as token with random token in functions.operator
This commit is contained in:
@@ -271,29 +271,6 @@ function getRandomID()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a random sequence of characters
|
||||
*
|
||||
* @param mixed $length Length of resulting string
|
||||
* @param string $pattern To define which characters should be in the resulting string
|
||||
*
|
||||
* From Limesurvey
|
||||
*/
|
||||
function sRandomChars($length = 15,$pattern="23456789abcdefghijkmnpqrstuvwxyz")
|
||||
{
|
||||
$patternlength = strlen($pattern)-1;
|
||||
for($i=0;$i<$length;$i++)
|
||||
{
|
||||
if(isset($key))
|
||||
$key .= $pattern{rand(0,$patternlength)};
|
||||
else
|
||||
$key = $pattern{rand(0,$patternlength)};
|
||||
}
|
||||
return $key;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Taken from admin/database.php in the LimeSurvey package
|
||||
|
||||
Reference in New Issue
Block a user