EBernhardson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/271027
Change subject: Provide access to SearchConfig in InterwikiSearcher
......................................................................
Provide access to SearchConfig in InterwikiSearcher
Bug: T126672
Change-Id: Ibb0ecb86b53cbc96d6f9eb33222d3382cb264216
---
M includes/Connection.php
M includes/InterwikiSearcher.php
2 files changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch
refs/changes/27/271027/1
diff --git a/includes/Connection.php b/includes/Connection.php
index d4a3f18..38bc081 100644
--- a/includes/Connection.php
+++ b/includes/Connection.php
@@ -129,6 +129,13 @@
}
/**
+ * @return SearchConfig
+ */
+ public function getConfig() {
+ return $this->config;
+ }
+
+ /**
* @return string
*/
public function getClusterName() {
diff --git a/includes/InterwikiSearcher.php b/includes/InterwikiSearcher.php
index 8068479..c36bfee 100644
--- a/includes/InterwikiSearcher.php
+++ b/includes/InterwikiSearcher.php
@@ -76,7 +76,7 @@
$namespaceKey,
md5( $term )
);
- $ttl = $this->config->get( 'CirrusSearchInterwikiCacheTime' );
+ $ttl = $this->connection->getConfig()->get(
'CirrusSearchInterwikiCacheTime' );
return $cache->getWithSetCallback( $key, $ttl, function () {
$this->setResultsType( new InterwikiResultsType(
$this->interwiki ) );
--
To view, visit https://gerrit.wikimedia.org/r/271027
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb0ecb86b53cbc96d6f9eb33222d3382cb264216
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits