left the redirect with cur_random=0, so any new page created in its place never
appeared on Special:Randompage. Fix: calculate cur_random for redirect when
moving page.
$dbw =& wfGetDB( DB_MASTER );
$now = $dbw->timestamp();
$won = wfInvertTimestamp( wfTimestamp(TS_MW,$now) );
+ wfSeedRandom();
+ $rand = number_format( mt_rand() / mt_getrandmax(), 12, '.', '' );
# Rename cur entry
$dbw->updateArray( 'cur',
'inverse_timestamp' => $won,
'cur_touched' => $now,
'cur_is_redirect' => 1,
+ 'cur_random' => $rand,
'cur_is_new' => 1,
'cur_text' => "#REDIRECT [[" . $nt->getPrefixedText() . "]]\n" ), $fname
);