EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/324345
Change subject: Remove 'now using' message for CirrusSearch ...................................................................... Remove 'now using' message for CirrusSearch This was used when first deploying CirrusSearch. It may have been useful then, but seems like cruft just hanging around now. Remove it to make things just that little bit simpler. Change-Id: Ifa1bdf9126d7e2fc5b6647afbd68ffaa6de950d1 --- M CirrusSearch.php M includes/Hooks.php 2 files changed, 6 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/45/324345/1 diff --git a/CirrusSearch.php b/CirrusSearch.php index a108f29..c9af5ed 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -542,9 +542,6 @@ // whatever is configured). $wgCirrusSearchMoreLikeThisTTL = 0; -// Show the notification about this wiki using CirrusSearch on the search page. -$wgCirrusSearchShowNowUsing = false; - // CirrusSearch interwiki searching // Keys are the interwiki prefix, values are the index to search // Results are cached. @@ -1057,7 +1054,6 @@ $wgHooks[ 'LinksUpdateComplete' ][] = 'CirrusSearch\Hooks::onLinksUpdateCompleted'; $wgHooks[ 'ResourceLoaderGetConfigVars' ][] = 'CirrusSearch\Hooks::onResourceLoaderGetConfigVars'; $wgHooks[ 'SoftwareInfo' ][] = 'CirrusSearch\Hooks::onSoftwareInfo'; -$wgHooks[ 'SpecialSearchResultsPrepend' ][] = 'CirrusSearch\Hooks::onSpecialSearchResultsPrepend'; $wgHooks[ 'SpecialSearchResultsAppend' ][] = 'CirrusSearch\Hooks::onSpecialSearchResultsAppend'; $wgHooks[ 'TitleMove' ][] = 'CirrusSearch\Hooks::onTitleMove'; $wgHooks[ 'TitleMoveComplete' ][] = 'CirrusSearch\Hooks::onTitleMoveComplete'; diff --git a/includes/Hooks.php b/includes/Hooks.php index b7cda74..9b4db24 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -430,32 +430,6 @@ } /** - * Called to prepend text before search results and inject metrics - * @param SpecialSearch $specialSearch The SpecialPage object for Special:Search - * @param OutputPage $out The output page object - * @param string $term The term being searched for - * @return bool - */ - public static function onSpecialSearchResultsPrepend( $specialSearch, $out, $term ) { - global $wgCirrusSearchShowNowUsing; - - // Prepend our message if needed - if ( $wgCirrusSearchShowNowUsing ) { - $out->addHTML( Xml::openElement( 'div', [ 'class' => 'cirrussearch-now-using' ] ) . - $specialSearch->msg( 'cirrussearch-now-using' )->parse() . - Xml::closeElement( 'div' ) ); - } - - // Embed metrics if this was a Cirrus page - $engine = $specialSearch->getSearchEngine(); - if ( $engine instanceof CirrusSearch ) { - $out->addJsConfigVars( $engine->getLastSearchMetrics() ); - } - - return true; - } - - /** * @param SpecialSearch $specialSearch * @param OutputPage $out * @param string $term @@ -467,6 +441,12 @@ if ( $wgCirrusSearchFeedbackLink ) { self::addSearchFeedbackLink( $wgCirrusSearchFeedbackLink, $specialSearch, $out ); } + + // Embed metrics if this was a Cirrus page + $engine = $specialSearch->getSearchEngine(); + if ( $engine instanceof CirrusSearch ) { + $out->addJsConfigVars( $engine->getLastSearchMetrics() ); + } return true; } -- To view, visit https://gerrit.wikimedia.org/r/324345 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa1bdf9126d7e2fc5b6647afbd68ffaa6de950d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits