When there is no title given but a curid parameter is given, use the curid to pick...
authorMatt Johnston <mattj@users.mediawiki.org>
Wed, 1 Oct 2008 10:02:44 +0000 (10:02 +0000)
committerMatt Johnston <mattj@users.mediawiki.org>
Wed, 1 Oct 2008 10:02:44 +0000 (10:02 +0000)
RELEASE-NOTES
includes/Wiki.php

index 5e78934..af01ec4 100644 (file)
@@ -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 ===
 
index c87f078..31d1ebf 100644 (file)
@@ -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