(bug 28888) In Special:Search, Don't tell user the page [[:]] already exists
authorBrian Wolff <bawolff@users.mediawiki.org>
Tue, 10 May 2011 06:20:13 +0000 (06:20 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Tue, 10 May 2011 06:20:13 +0000 (06:20 +0000)
when they search for only a fragment identifer.

RELEASE-NOTES-1.19
includes/specials/SpecialSearch.php

index 1c25609..9c26d1e 100644 (file)
@@ -28,6 +28,8 @@ used in Tiff files.
 * When translcuding a special page, do not let it interpret url parameters.
 * (bug 28887) Special page classes are no longer re-used during 1 request.
 * New title field of Special:MovePage is now length limited on client side.
+* (bug 28888) Searching for something starting with a # sign no longer tells
+  the user a page named [[:]] already exists.
 
 === API changes in 1.19 ===
 
index 9178542..52dff74 100644 (file)
@@ -370,8 +370,9 @@ class SpecialSearch extends SpecialPage {
                global $wgOut;
 
                // show direct page/create link if applicable
+               // Check DBkey !== '' in case of fragment link only.
                $messageName = null;
-               if( !is_null($t) ) {
+               if( !is_null($t) && $t->getDBkey() !== '' ) {
                        if( $t->isKnown() ) {
                                $messageName = 'searchmenu-exists';
                        } elseif( $t->userCan( 'create' ) ) {