r41472 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41471‎ | r41472 | r41473 >
Date:10:02, 1 October 2008
Author:mattj
Status:old (Comments)
Tags:
Comment:
When there is no title given but a curid parameter is given, use the curid to pick a page. Curid also now has precedence over title when picking a page, which keeps it consistent with oldid.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -102,11 +102,11 @@
103103
104104 $ret = NULL;
105105
106 - if ( '' == $title && 'delete' != $action ) {
107 - $ret = Title::newMainPage();
108 - } elseif ( $curid = $wgRequest->getInt( 'curid' ) ) {
 106+ if ( $curid = $wgRequest->getInt( 'curid' ) ) {
109107 # URLs like this are generated by RC, because rc_title isn't always accurate
110108 $ret = Title::newFromID( $curid );
 109+ } elseif ( '' == $title && 'delete' != $action ) {
 110+ $ret = Title::newMainPage();
111111 } else {
112112 $ret = Title::newFromURL( $title );
113113 // check variant links so that interwiki links don't have to worry
Index: trunk/phase3/RELEASE-NOTES
@@ -230,6 +230,7 @@
231231 * (bug 15158) Userinvalidcssjstitle not shown on preview
232232 * (bug 15196) Free external links should be numbered in a localised manner
233233 * (bug 15388) Title of Special:PrefixIndex
 234+* Links with no title but a curid parameter now use the curid to pick a page
234235
235236 === API changes in 1.14 ===
236237

Comments

#Comment by Brion VIBBER (talk | contribs)   18:58, 1 October 2008

Looks good!

Status & tagging log