From 361c38da86f264ddc4e406088a1b8ce0beae7fde Mon Sep 17 00:00:00 2001 From: Wil Mahan Date: Mon, 11 Oct 2004 19:17:34 +0000 Subject: [PATCH] Use the new wfRandom() function for setting cur_random --- includes/Article.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.20.1