Demon has uploaded a new change for review.
https://gerrit.wikimedia.org/r/74560
Change subject: Don't use empty() to check if array has 0 items
......................................................................
Don't use empty() to check if array has 0 items
Change-Id: Ia3d8a6882224aa900574d4584411a02fa1884119
---
M CirrusSearch.body.php
M updateSearchConfig.php
2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch
refs/changes/60/74560/1
diff --git a/CirrusSearch.body.php b/CirrusSearch.body.php
index 8008af9..fa42d21 100644
--- a/CirrusSearch.body.php
+++ b/CirrusSearch.body.php
@@ -190,7 +190,7 @@
}
// Actual text query
- if ( trim( $term ) !== '' || !empty( $extraQueryStrings ) ) {
+ if ( trim( $term ) !== '' || $extraQueryStrings ) {
$queryStringQueryString = trim( implode( ' ',
$extraQueryStrings ) . ' ' . CirrusSearch::fixupQueryString( $term ) );
$queryStringQuery = new \Elastica\Query\QueryString(
$queryStringQueryString );
$fields = array( 'title^20.0', 'text^3.0' );
diff --git a/updateSearchConfig.php b/updateSearchConfig.php
index 63fcc91..5717985 100644
--- a/updateSearchConfig.php
+++ b/updateSearchConfig.php
@@ -217,7 +217,7 @@
$otherIndeciesWithAlias[] = $index->getName();
}
}
- if ( empty( $otherIndeciesWithAlias ) ) {
+ if ( !$otherIndeciesWithAlias ) {
$this->output( "alias is free..." );
$this->getIndex()->addAlias(
CirrusSearch::getIndexName(), false );
$this->output( "corrected\n" );
--
To view, visit https://gerrit.wikimedia.org/r/74560
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3d8a6882224aa900574d4584411a02fa1884119
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Demon <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits