From: Wil Mahan Date: Mon, 11 Oct 2004 19:17:34 +0000 (+0000) Subject: Use the new wfRandom() function for setting cur_random X-Git-Tag: 1.5.0alpha1~1583 X-Git-Url: http://git.cyclocoop.org/geomaker.php?a=commitdiff_plain;h=361c38da86f264ddc4e406088a1b8ce0beae7fde;p=lhc%2Fweb%2Fwiklou.git Use the new wfRandom() function for setting cur_random --- diff --git a/includes/Article.php b/includes/Article.php index 5fbeb2ab9e..3204b74354 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -925,7 +925,7 @@ class Article { $now = wfTimestampNow(); $won = wfInvertTimestamp( $now ); wfSeedRandom(); - $rand = number_format( mt_rand() / mt_getrandmax(), 12, '.', '' ); + $rand = wfRandom(); $dbw =& wfGetDB( DB_MASTER ); $cur_id = $dbw->nextSequenceValue( 'cur_cur_id_seq' ); @@ -2097,7 +2097,7 @@ class Article { $fields['cur_is_new'] = 1; $fields['cur_namespace'] = $ns; $fields['cur_title'] = $dbkey; - $fields['cur_random'] = $rand = number_format( mt_rand() / mt_getrandmax(), 12, '.', '' ); + $fields['cur_random'] = $rand = wfRandom(); $dbw->insertArray( 'cur', $fields, $fname ); } wfProfileOut( $fname );