mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14:07 +02:00
Elasticsearch: check for valid mappings
This commit is contained in:
@@ -280,13 +280,15 @@ if (isset($_GET["elastic"])) {
|
||||
if (!$mappings) {
|
||||
$mappings = $result[$connection->_db]['mappings'][$table]['properties'];
|
||||
}
|
||||
foreach ($mappings as $name => $field) {
|
||||
$return[$name] = array(
|
||||
"field" => $name,
|
||||
"full_type" => $field["type"],
|
||||
"type" => $field["type"],
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1),
|
||||
);
|
||||
if ($mappings) {
|
||||
foreach ($mappings as $name => $field) {
|
||||
$return[$name] = array(
|
||||
"field" => $name,
|
||||
"full_type" => $field["type"],
|
||||
"type" => $field["type"],
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
|
Reference in New Issue
Block a user