From b45a24ed16aeaedb6e0085d32a5e0e151bb54aa6 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Wed, 1 Oct 2008 10:02:44 +0000 Subject: [PATCH] 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. --- RELEASE-NOTES | 1 + includes/Wiki.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5e789346c2..af01ec4ad0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -230,6 +230,7 @@ The following extensions are migrated into MediaWiki 1.14: * (bug 15158) Userinvalidcssjstitle not shown on preview * (bug 15196) Free external links should be numbered in a localised manner * (bug 15388) Title of Special:PrefixIndex +* Links with no title but a curid parameter now use the curid to pick a page === API changes in 1.14 === diff --git a/includes/Wiki.php b/includes/Wiki.php index c87f07826c..31d1ebfef0 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -102,11 +102,11 @@ class MediaWiki { $ret = NULL; - if ( '' == $title && 'delete' != $action ) { - $ret = Title::newMainPage(); - } elseif ( $curid = $wgRequest->getInt( 'curid' ) ) { + if ( $curid = $wgRequest->getInt( 'curid' ) ) { # URLs like this are generated by RC, because rc_title isn't always accurate $ret = Title::newFromID( $curid ); + } elseif ( '' == $title && 'delete' != $action ) { + $ret = Title::newMainPage(); } else { $ret = Title::newFromURL( $title ); // check variant links so that interwiki links don't have to worry -- 2.20.1