Fix for floating point random value in non-english locales which may use comma as...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 8 Jul 2003 11:15:26 +0000 (11:15 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 8 Jul 2003 11:15:26 +0000 (11:15 +0000)
includes/Article.php

index c75d62e..a45264e 100644 (file)
@@ -611,7 +611,7 @@ name=\"wpSummary\" maxlength=200 size=60><br>
                $now = wfTimestampNow();
                $won = wfInvertTimestamp( $now );
                wfSeedRandom();
-               $rand = mt_rand() / mt_getrandmax();
+               $rand = number_format( mt_rand() / mt_getrandmax(), 12, ".", "" );
                $sql = "INSERT INTO cur (cur_namespace,cur_title,cur_text," .
                  "cur_comment,cur_user,cur_timestamp,cur_minor_edit,cur_counter," .
                  "cur_restrictions,cur_user_text,cur_is_redirect," .