r5252 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5251‎ | r5252 | r5253 >
Date:05:41, 17 September 2004
Author:kateturner
Status:old
Tags:
Comment:
Fix special:randompage bug when moving pages (MFC includes/Title.php 1.117)
Modified paths:
  • /branches/REL1_3/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_3/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: branches/REL1_3/phase3/RELEASE-NOTES
@@ -18,6 +18,8 @@
1919 participation 'trusted' wikis, as it does not protect against cross-site
2020 scripting attacks. For security, this option can only be enabled if in
2121 $wgWhitelistEdit mode.
 22+* Fixed problem where pages which were created as a redirect following
 23+ a move never showed on Special:Randompage.
2224
2325
2426 == Version 1.3.3, 2004-09-09 ==
Index: branches/REL1_3/phase3/includes/Title.php
@@ -1062,6 +1062,8 @@
10631063 $won = wfInvertTimestamp( $now );
10641064 $newid = $nt->getArticleID();
10651065 $oldid = $this->getArticleID();
 1066+ wfSeedRandom();
 1067+ $rand = number_format( mt_rand() / mt_getrandmax(), 12, '.', '' );
10661068
10671069 # Rename cur entry
10681070 wfUpdateArray(
@@ -1088,6 +1090,7 @@
10891091 'inverse_timestamp' => $won,
10901092 'cur_touched' => $now,
10911093 'cur_is_redirect' => 1,
 1094+ 'cur_random' => $rand,
10921095 'cur_is_new' => 1,
10931096 'cur_text' => "#REDIRECT [[" . $nt->getPrefixedText() . "]]\n" )
10941097 );

Status & tagging log