On 6/22/07, brion(a)svn.wikimedia.org <brion(a)svn.wikimedia.org> wrote:
Revision: 23220
Author: brion
Date: 2007-06-22 14:25:23 +0000 (Fri, 22 Jun 2007)
Log Message:
-----------
Revert r23197 -- while well-meaning, this would severely overrepresent
minor content namespaces by selecting the namespaces with equal probability.
A better solution would be to modify the RandomPage class to allow passing
pages of multiple namespaces, and giving it the complete list of content
namespaces; then the selection would be properly proportional.
<snip>
True -- my bad :). I was getting irritated by Randompage only returning one
or two pages in the mainspace on my wiki, rather than pulling from the
several other pages in other content namespaces, so did this as a quick
"fix". It would be quite nice to have Randompage select a random content
page, rather than just a random page in the mainspace, however, so I'll see
about implementing a more elegant and correct solution later on. Thanks for
catching that, Brion; I'll try to refrain from committing at 2am from now on
=D.
--
Daniel Cannon (AmiDaniel)
http://amidaniel.com
cannon.danielc(a)gmail.com