dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5648184
)
Work around comma-in-string-form-of-random-index bug which appears when set to a...
author
Brion Vibber
<brion@users.mediawiki.org>
Fri, 6 Jun 2003 18:38:14 +0000
(18:38 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Fri, 6 Jun 2003 18:38:14 +0000
(18:38 +0000)
includes/SpecialRandompage.php
patch
|
blob
|
history
diff --git
a/includes/SpecialRandompage.php
b/includes/SpecialRandompage.php
index
344000a
..
9eadd04
100644
(file)
--- a/
includes/SpecialRandompage.php
+++ b/
includes/SpecialRandompage.php
@@
-7,10
+7,12
@@
function wfSpecialRandompage()
wfSeedRandom();
$rand = mt_rand() / mt_getrandmax();
+ # interpolation and sprintf() can muck up with locale-specific decimal separator
+ $randstr = number_format( $rand, 12, ".", "" );
$sqlget = "SELECT cur_id,cur_title
FROM cur USE INDEX (cur_random)
WHERE cur_namespace=0 AND cur_is_redirect=0
- AND cur_random>$rand
+ AND cur_random>$rand
str
ORDER BY cur_random
LIMIT 1";
$res = wfQuery( $sqlget, $fname );