From 6f3a5ab810229ea3c41b9db22fa00c5439909452 Mon Sep 17 00:00:00 2001 From: Florian Date: Tue, 29 Jul 2014 20:15:55 +0200 Subject: [PATCH] Special:Search: Insert a difference between exist and non exist page The css class of "page exist" or "create this page" should be different when the page exists (instead of "createlink"). Change-Id: I6d4d9d88a561749ae158ca9d27e563c2c5f9b943 --- includes/specials/SpecialSearch.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 1df674a55b..4532f98d68 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -424,8 +424,10 @@ class SpecialSearch extends SpecialPage { return; } + $linkClass = 'mw-search-createlink'; if ( $title->isKnown() ) { $messageName = 'searchmenu-exists'; + $linkClass = 'mw-search-exists'; } elseif ( $title->quickUserCan( 'create', $this->getUser() ) ) { $messageName = 'searchmenu-new'; } else { @@ -440,7 +442,7 @@ class SpecialSearch extends SpecialPage { // Extensions using the hook might still return an empty $messageName if ( $messageName ) { - $this->getOutput()->wrapWikiMsg( "

\n$1

", $params ); + $this->getOutput()->wrapWikiMsg( "

\n$1

", $params ); } else { // preserve the paragraph for margins etc... $this->getOutput()->addHtml( '

' ); -- 2.20.1