From: Brion Vibber Date: Tue, 8 Jul 2003 11:15:26 +0000 (+0000) Subject: Fix for floating point random value in non-english locales which may use comma as... X-Git-Tag: 1.1.0~436 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=92c2e450b09395fb9b02c0331a6e8c5d75ad0884;p=lhc%2Fweb%2Fwiklou.git Fix for floating point random value in non-english locales which may use comma as decimal separator --- diff --git a/includes/Article.php b/includes/Article.php index c75d62e6c4..a45264e64f 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -611,7 +611,7 @@ name=\"wpSummary\" maxlength=200 size=60>
$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," .