MDL-41198 lib: Allow PHP to generate random seed on script start

Most srand instances are removed to allow PHP to do the work.

srand was left for group randomization due to the method used.

Conflicts:

	lib/tests/accesslib_test.php
This commit is contained in:
Russell Smith
2013-12-18 16:56:50 +11:00
parent e6af311972
commit 02ea7c378c
5 changed files with 3 additions and 14 deletions
-2
View File
@@ -9720,7 +9720,6 @@ function unformat_float($locale_float, $strict = false) {
*/
function swapshuffle($array) {
srand ((double) microtime() * 10000000);
$last = count($array) - 1;
for ($i=0;$i<=$last;$i++) {
$from = rand(0,$last);
@@ -9760,7 +9759,6 @@ function swapshuffle_assoc($array) {
* @return array
*/
function draw_rand_array($array, $draws) {
srand ((double) microtime() * 10000000);
$return = array();