Bug 589: make random selection slightly more random. PHP's
authorWil Mahan <wmahan@users.mediawiki.org>
Mon, 11 Oct 2004 17:34:39 +0000 (17:34 +0000)
committerWil Mahan <wmahan@users.mediawiki.org>
Mon, 11 Oct 2004 17:34:39 +0000 (17:34 +0000)
commit2a03980093b5168a834bbf65e820c5400e29b21b
treeb4f76b32ed5549a472cc1e10a310f22265d1b3d5
parenta2f8c159a9d4a32cdbb303f1556dda41c9a626da
Bug 589: make random selection slightly more random. PHP's
mt_rand() function has a maximum value of 2^31-1, which
is small enough that duplicate values can occur due to the
Birthday paradox, e.g. on the English Wikipedia. To fix
this, add a wfRandom() function that calls mt_rand()
twice to get the desired amount of randomness.
includes/GlobalFunctions.php
includes/SpecialRandompage.php
includes/SpecialUndelete.php
includes/Title.php