Don't convert bad curids to the Main Page
authorJackmcbarn <jackmcbarn@gmail.com>
Fri, 3 Jan 2014 00:56:47 +0000 (19:56 -0500)
committerJackmcbarn <jackmcbarn@gmail.com>
Fri, 3 Jan 2014 00:56:47 +0000 (19:56 -0500)
When a curid that doesn't exist is requested, cause the "Bad title" error
to be displayed rather than displaying the Main Page.

Bug: 58885
Change-Id: If54ca35b3799b8cf2f76e7f8a03001caa1fac676

includes/Wiki.php

index 5ebf5a0..201e9c5 100644 (file)
@@ -117,7 +117,7 @@ class MediaWiki {
                }
 
                // Use the main page as default title if nothing else has been provided
-               if ( $ret === null && strval( $title ) === '' && $action !== 'delete' ) {
+               if ( $ret === null && strval( $title ) === '' && !$request->getCheck( 'curid' ) && $action !== 'delete' ) {
                        $ret = Title::newMainPage();
                }