r87809 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87808‎ | r87809 | r87810 >
Date:06:20, 10 May 2011
Author:bawolff
Status:ok
Tags:
Comment:
(bug 28888) In Special:Search, Don't tell user the page [[:]] already exists
when they search for only a fragment identifer.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/specials/SpecialSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -28,6 +28,8 @@
2929 * When translcuding a special page, do not let it interpret url parameters.
3030 * (bug 28887) Special page classes are no longer re-used during 1 request.
3131 * New title field of Special:MovePage is now length limited on client side.
 32+* (bug 28888) Searching for something starting with a # sign no longer tells
 33+ the user a page named [[:]] already exists.
3234
3335 === API changes in 1.19 ===
3436
Index: trunk/phase3/includes/specials/SpecialSearch.php
@@ -370,8 +370,9 @@
371371 global $wgOut;
372372
373373 // show direct page/create link if applicable
 374+ // Check DBkey !== '' in case of fragment link only.
374375 $messageName = null;
375 - if( !is_null($t) ) {
 376+ if( !is_null($t) && $t->getDBkey() !== '' ) {
376377 if( $t->isKnown() ) {
377378 $messageName = 'searchmenu-exists';
378379 } elseif( $t->userCan( 'create' ) ) {

Status & tagging log