1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-18 04:11:27 +02:00

44 Commits

Author SHA1 Message Date
Jakub Vrana
1e963cf90f Change var to public 2025-03-11 08:17:00 +01:00
Jakub Vrana
0c15a9f42d Use private visibility on methods 2025-03-11 08:16:41 +01:00
Jakub Vrana
c454ea8430 Use protected visibility 2025-03-11 08:16:41 +01:00
Jakub Vrana
607febea8e Use private visibility 2025-03-11 08:16:39 +01:00
Christian Weiske
fde7d7dde2 Elastic: Properly display sparse result rows
Result records in Elasticsearch do not always have all columns
that are defined in an index.
This often happens when multiple document types are stored in the same index.

The first row has columns ["_id", "html", "url"], while the second
misses the "html" column: ["_id", "url"].

Adminer expects that all result rows include all columns.
This leads to the problem that the "url" value in the 2nd example row
was rendered in the "html" column.

This patch fixes this problem by fetching the actual column list first
when all fields are to be shown, and using that field list
as base for all rows.
2025-03-10 21:14:54 +01:00
Christian Weiske
e993462412 Elastic: Fix record insertion on Elasticsearch 7
1. Make values NULLable by default, so that empty values do not
get submitted to the Elasticsearch server.
This helps e.g. with empty date fields - Elasticsearch would try to
convert the field type to string when the value is an empty string,
but that fails when there are documents with properly filled date fields

2. Remove _id from the POST array because this is not allowed.
The server fails if it is included with
> mapper_parsing_exception:
> Field [_id] is a metadata field and cannot be added inside a document.
> Use the index API request parameters.

3. Use the correct URL to create a document: "$index/_doc/"
and "$index/_doc/$id". This is the same for ES 7 and 8:
- https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-index_.html#docs-index-api-request
- https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docs-index_.html#docs-index-api-request

4. Handle failed creations by checking for false

5. Return the "result" property string instead of the non-existing
"created" property.
2025-03-10 21:13:16 +01:00
Peter Knut
e883ad428e Add support for "order" field privilege
In Elasticsearch, text fields are not sortable.
2025-03-08 23:12:00 +01:00
Peter Knut
87d87248c1 Add support for "where" field privilege
In Elasticsearch, only indexed fields are searchable.
2025-03-08 23:05:16 +01:00
Jakub Vrana
2c9f380c64 Elastic: Remove plugin for version 5 2025-03-07 12:17:14 +01:00
Jakub Vrana
9918f4155e Pass credentials to connect() 2025-03-07 12:03:29 +01:00
Jakub Vrana
94a4f61db2 PHP: Use ?: 2025-03-06 18:12:22 +01:00
Jakub Vrana
0541680d73 Move constants to namespace 2025-03-06 17:34:21 +01:00
Jakub Vrana
d268e0ebb4 ClickHouse: Check for allow_url_fopen 2025-03-06 14:30:50 +01:00
Jakub Vrana
5fdaae27dc Move possible drivers and JUSH to Driver 2025-03-06 14:27:58 +01:00
Jakub Vrana
a8feb00098 Move unsigned to Driver 2025-03-06 13:58:15 +01:00
Jakub Vrana
69d7d76dc5 Move operators, functions and grouping to Driver 2025-03-06 13:51:49 +01:00
Jakub Vrana
2f0cd4185b Move edit functions to Driver 2025-03-06 13:28:04 +01:00
Jakub Vrana
37a75f3759 Move types to Driver 2025-03-06 12:35:20 +01:00
Jakub Vrana
c873ceba17 Use PHP 5.3 functions 2025-03-05 15:54:13 +01:00
Jakub Vrana
105999f62e Code style: Indent long statements 2025-03-05 15:01:21 +01:00
Jakub Vrana
ed5de27dd3 Code style: Indent long statements 2025-03-05 14:59:13 +01:00
Jakub Vrana
af68e30742 Code style: Remove newline before } 2025-03-05 14:38:48 +01:00
Jakub Vrana
f468c095ae Make root namespace explicit 2025-03-05 14:25:09 +01:00
Jakub Vrana
3da09dd31a Rename Min_ classes 2025-03-05 14:12:42 +01:00
Jakub Vrana
e1e085f312 Use namespace in callbacks 2025-03-05 13:10:40 +01:00
Jakub Vrana
52c5392089 PHP: Use namespace 2025-03-05 13:10:40 +01:00
Jakub Vrana
c52ba0308e Specify coding style and follow it 2025-03-05 13:10:37 +01:00
Christian Weiske
d5a17835ff Elastic: Fix text search on boolean fields
When searching in all fields for a text value, an error was thrown
with ElasticSearch 7.17.23 when the index contains boolean fields:

> query_shard_exception: failed to create query:
> Can't parse boolean value [textvalue], expected [true] or [false]

This patch fixes that problem by skipping boolean fields when the
search word is not the string "true" or "false".
2025-03-03 10:40:38 +01:00
Jakub Vrana
45f24a8f62 Delete unused functions 2025-02-26 16:48:02 +01:00
Jakub Vrana
6fe9827eea Trim trailing whitespace 2025-02-21 13:59:17 +01:00
Jakub Vrana
63cffbbc8a Fix style 2025-02-21 10:57:11 +01:00
Vladimir Goncharov
2385bf72bd support for array values in clickhouse driver 2025-02-19 14:36:07 +01:00
Jakub Vrana
2bec4ca11b Avoid global variables in plugins drivers 2025-02-19 14:36:07 +01:00
Jakub Vrana
e5c05fe26c Elastic 5: Do not set Content-Type without content 2025-02-19 12:31:44 +01:00
Jakub Vrana
2a3626faae SimpleDB: Disable XML entity loader 2025-02-19 11:16:45 +01:00
Jakub Vrana
51dbfb6987 Hide error message from HTTP servers 2025-02-19 11:16:45 +01:00
Jakub Vrana
578c9fca92 Don't allow path in HTTP servers 2025-02-19 11:16:45 +01:00
Jakub Vrana
d9289355d7 Fix style 2025-02-19 11:16:45 +01:00
Peter Knut
ac9fd04f87 Fix field selection in Elasticsearch
Thanks to cweiske: https://github.com/adminerevo/adminerevo/pull/159
2025-02-19 11:16:36 +01:00
Peter Knut
76575a95f1 Move Elastic drivers to plugins, driver for Elastic 7+ is the default 2025-02-19 11:16:35 +01:00
Peter Knut
b2759df1f9 Disable redirections in HTTP based drivers 2025-02-16 18:03:17 +01:00
Jakub Vrana
9bd63a1326 Update readme 2021-02-10 19:52:55 +01:00
Jakub Vrana
3882bfaac1 Remove .inc extension from driver plugins 2021-02-10 11:43:56 +01:00
Jakub Vrana
51abdcdab9 SimpleDB, Firebird, ClickHouse: Move to plugin 2021-02-08 19:56:15 +01:00