]> git.joonet.de Git - adminer.git/commitdiff
Elasticsearch: fix tables_list
authorGargaj <gargaj@conspiracy.hu>
Fri, 5 Sep 2014 23:43:34 +0000 (01:43 +0200)
committerJakub Vrana <jakub@vrana.cz>
Thu, 11 Sep 2014 15:32:03 +0000 (08:32 -0700)
otherwise it only returns "mappings" as the table

adminer/drivers/elastic.inc.php

index 3aac8331160a8cb704f958f30e5507253cb5732f..6b1405a9d930bd7524391caf0f3b187870cf4db4 100644 (file)
@@ -222,7 +222,7 @@ if (isset($_GET["elastic"])) {
                global $connection;
                $return = $connection->query('_mapping');
                if ($return) {
-                       $return = array_fill_keys(array_keys(reset($return)), 'table');
+                       $return = array_fill_keys(array_keys($return[$connection->_db]["mappings"]), 'table');
                }
                return $return;
        }