From a8b5540d28cea5018c09533a0c322d1660767060 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 12 Apr 2008 18:37:05 +0000 Subject: [PATCH] (bug 13708) Don't set "Search results" title when loading Special:Search without query --- RELEASE-NOTES | 4 +++- includes/SpecialSearch.php | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ada58b7dfc..2a53a28886 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -72,7 +72,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Automatically add old redirects to the redirect table when needed * (bug 6934) Allow separated inclusions, links, redirects on whatlinkshere * Add a footer (emailuser-footer) to the bottom of messages sent with -Special:EmailUser + Special:EmailUser * Cache image redirects === Bug fixes in 1.13 === @@ -177,6 +177,8 @@ Special:EmailUser * Hide (undo) link if user isn't able to edit page * Invalidate cache of pages that includes images via redirects on upload * (bug 13705) Don't show rollback link in page history if called with dir=prev +* (bug 13708) Don't set "Search results" title when loading Special:Search + without query === API changes in 1.13 === diff --git a/includes/SpecialSearch.php b/includes/SpecialSearch.php index b16ceb19d0..5b642bfaca 100644 --- a/includes/SpecialSearch.php +++ b/includes/SpecialSearch.php @@ -261,8 +261,9 @@ class SpecialSearch { */ function setupPage( $term ) { global $wgOut; - $wgOut->setPageTitle( wfMsg( 'searchresults' ) ); - $subtitlemsg = ( Title::newFromText($term) ? 'searchsubtitle' : 'searchsubtitleinvalid' ); + if( !empty( $term ) ) + $wgOut->setPageTitle( wfMsg( 'searchresults' ) ); + $subtitlemsg = ( Title::newFromText( $term ) ? 'searchsubtitle' : 'searchsubtitleinvalid' ); $wgOut->setSubtitle( $wgOut->parse( wfMsg( $subtitlemsg, wfEscapeWikiText($term) ) ) ); $wgOut->setArticleRelated( false ); $wgOut->setRobotpolicy( 'noindex,nofollow' ); -- 2.20.1