From: Brian Wolff Date: Tue, 10 May 2011 06:20:13 +0000 (+0000) Subject: (bug 28888) In Special:Search, Don't tell user the page [[:]] already exists X-Git-Tag: 1.31.0-rc.0~30297 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=f1971e20c23ef91846afbf143dbb2bb1ec97e8f5;p=lhc%2Fweb%2Fwiklou.git (bug 28888) In Special:Search, Don't tell user the page [[:]] already exists when they search for only a fragment identifer. --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 1c25609b65..9c26d1e439 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -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 === diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 917854288d..52dff74944 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -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' ) ) {