Chad has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/91137


Change subject: Fix ElasticaConnection to not care what wiki we're on
......................................................................

Fix ElasticaConnection to not care what wiki we're on

Wikis might want to connect to other wikis ;-)

Change-Id: I1d8aa7f94417d835dacbf051f9ebe5f090796bb8
---
M ElasticaConnection.php
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Elastica 
refs/changes/37/91137/1

diff --git a/ElasticaConnection.php b/ElasticaConnection.php
index d83d8ba..d395e1b 100644
--- a/ElasticaConnection.php
+++ b/ElasticaConnection.php
@@ -79,22 +79,23 @@
 
        /**
         * Fetch the Elastica Index.
+        * @param string $name get the index(es) with this basename
         * @param mixed $type type of index (named type or false to get all)
-        * @param mixed $identifier if specified get the named identified 
version of the index
+        * @param mixed $identifier if specified get the named identifier of 
the index
         * @return \Elastica\Index
         */
-       public static function getIndex( $type = false, $identifier = false ) {
-               return self::getClient()->getIndex( self::getIndexName( $type, 
$identifier ) );
+       public static function getIndex( $name, $type = false, $identifier = 
false ) {
+               return self::getClient()->getIndex( self::getIndexName( $name, 
$type, $identifier ) );
        }
 
        /**
         * Get the name of the index.
+        * @param string $name get the index(es) with this basename
         * @param mixed $type type of index (named type or false to get all)
         * @param mixed $identifier if specified get the named identifier of 
the index
         * @return string name of index for $type and $identifier
         */
-       public static function getIndexName( $type = false, $identifier = false 
) {
-               $name = wfWikiId();
+       public static function getIndexName( $name, $type = false, $identifier 
= false ) {
                if ( $type ) {
                        $name .= '_' . $type;
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/91137
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d8aa7f94417d835dacbf051f9ebe5f090796bb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Elastica
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to