From: Florian Date: Tue, 29 Jul 2014 18:15:55 +0000 (+0200) Subject: Special:Search: Insert a difference between exist and non exist page X-Git-Tag: 1.31.0-rc.0~14691^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27vote%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=6f3a5ab810229ea3c41b9db22fa00c5439909452;p=lhc%2Fweb%2Fwiklou.git 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 --- 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( '

' );