mirror of
https://github.com/vrana/adminer.git
synced 2025-09-02 19:02:36 +02:00
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2993ee4ea7 | ||
|
27ae5e7895 | ||
|
c54e6fb589 | ||
|
f8bff19898 | ||
|
3195023248 | ||
|
4a65703334 | ||
|
5c9e0f6d5a | ||
|
8e2745ab4f | ||
|
f4d06b50fc | ||
|
1abaa642ae | ||
|
cad67e2c68 | ||
|
d53c966ef7 | ||
|
5490c1654c | ||
|
e69f0afc2a | ||
|
3380f3aaea | ||
|
ddb7dedfa4 | ||
|
0590d7d3ef | ||
|
44e59cd698 |
67
.github/workflows/codeql-analysis.yml
vendored
67
.github/workflows/codeql-analysis.yml
vendored
@@ -1,67 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '20 16 * * 0'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -4,4 +4,4 @@
|
||||
/**/compiled
|
||||
/vendor/
|
||||
/composer.lock
|
||||
/temp
|
||||
/export/
|
||||
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,6 +0,0 @@
|
||||
[submodule "designs/hydra"]
|
||||
path = designs/hydra
|
||||
url = https://github.com/Niyko/Hydra-Dark-Theme-for-Adminer
|
||||
[submodule "designs/pepa-linha-dark"]
|
||||
path = designs/pepa-linha-dark
|
||||
url = https://github.com/pepa-linha/Adminer-Design-Dark/
|
98
CHANGELOG.md
98
CHANGELOG.md
@@ -1,8 +1,30 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
Adminer 4.13 (2025-01-23)
|
||||
-------------------------
|
||||
AdminerNeo 4.14 (2025-02-02)
|
||||
----------------------------
|
||||
|
||||
### Changes
|
||||
|
||||
- Change project's name to AdminerNeo
|
||||
- Add support for page scrolling while dragging sortable rows (issue #11)
|
||||
- Update lucas-sandery theme (by @lucas-sandery)
|
||||
- Switch JsShrink library to a custom fork (issue #17)
|
||||
- Compile adminer into the "export" directory
|
||||
- Small JS tuning for better CodeQL analysis
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- MariaDB: Fix missing uca1400 collations
|
||||
- PostgreSQL: Fix initial value of exported autoincrement
|
||||
- PostgreSQL: Fix renaming a database
|
||||
- Fix warnings in language detection
|
||||
- Fix link to language files in README.md (issue #18)
|
||||
|
||||
Thanks for help with invalid links: @adrianbj.
|
||||
|
||||
AdminerNeo 4.13 (2025-01-23)
|
||||
----------------------------
|
||||
|
||||
### Changes
|
||||
|
||||
@@ -16,13 +38,13 @@ Adminer 4.13 (2025-01-23)
|
||||
- SQLite: Fix exporting and recreating tables with UNIQUE column constraint
|
||||
- Fix main visual glitches in designs
|
||||
|
||||
Adminer 4.12 (2024-11-21)
|
||||
-------------------------
|
||||
AdminerNeo 4.12 (2024-11-21)
|
||||
----------------------------
|
||||
|
||||
### New features
|
||||
|
||||
- MySQL: Print comments of stored procedures and functions
|
||||
- MariaDB: Add support for UUID data type (by vukbgit)
|
||||
- MariaDB: Add support for UUID data type (by @vukbgit)
|
||||
- MS SQL: Allow to set Encrypt and TrustServerCertificate with AdminerLoginSsl plugin (issue #5)
|
||||
- MS SQL, MongoDB: Connect to localhost with default port if server is not specified
|
||||
- Compiler: Allow to compile only selected drivers and languages
|
||||
@@ -34,7 +56,7 @@ Adminer 4.12 (2024-11-21)
|
||||
- Update project URL and info
|
||||
- Rename 'server' driver to 'mysql'
|
||||
- Compiler: MySQL driver is no longer the required default
|
||||
- Update Spanish translations (by isaacpolaino)
|
||||
- Update Spanish translations (by @isaacpolaino)
|
||||
|
||||
### Bugfixes
|
||||
|
||||
@@ -46,8 +68,8 @@ Adminer 4.12 (2024-11-21)
|
||||
- Compiler: Fix translations in plugins
|
||||
- Compiler: Fix compiled SQLite single-driver Adminer
|
||||
|
||||
Adminer 4.11 (2024-10-30)
|
||||
-------------------------
|
||||
AdminerNeo 4.11 (2024-10-30)
|
||||
----------------------------
|
||||
|
||||
### New features
|
||||
|
||||
@@ -69,24 +91,24 @@ Adminer 4.11 (2024-10-30)
|
||||
- MS SQL: Prefix Unicode strings with 'N' so they are treated correctly
|
||||
- Fix printing error message while validating server URL
|
||||
|
||||
Adminer 4.10 (2024-10-22)
|
||||
-------------------------
|
||||
AdminerNeo 4.10 (2024-10-22)
|
||||
----------------------------
|
||||
|
||||
### New features
|
||||
|
||||
- Add drag-n-drop moving of rows in table selection filter
|
||||
- Add drag-n-drop moving of rows in table editing
|
||||
- Add removal buttons to table selection filter (by Roy Orbitson)
|
||||
- Enable regular expressions when searching data in all tables (by Roy Orbitson)
|
||||
- Add removal buttons to table selection filter (by @Roy-Orbison)
|
||||
- Enable regular expressions when searching data in all tables (by @Roy-Orbison)
|
||||
- Integrate tables-filter plugin into the base code
|
||||
- Plugin to auto-include adminer.js when present (by Roy Orbitson)
|
||||
- Plugin to auto-include adminer.js when present (by @Roy-Orbison)
|
||||
- Print username next to the logout button
|
||||
- Show partitioning info in table structure page
|
||||
- Show second link for editing a table under the table view
|
||||
|
||||
### Changes
|
||||
|
||||
- Check new version against GitHub pages (by Adrian Jones)
|
||||
- Check new version against GitHub pages (by @adrianbj)
|
||||
- Add 'Home' to breadcrumb navigation
|
||||
- Full width design for database select box
|
||||
- Add table head to the list of indexes
|
||||
@@ -102,8 +124,8 @@ Adminer 4.10 (2024-10-22)
|
||||
|
||||
- Fix missing SQL statement if warnings are printed (regression from 4.9)
|
||||
|
||||
Adminer 4.9.4 (2024-10-09)
|
||||
--------------------------
|
||||
AdminerNeo 4.9.4 (2024-10-09)
|
||||
-----------------------------
|
||||
|
||||
- Fix the width of inline edit field
|
||||
- Unify displaying of 'New item' action based on privileges
|
||||
@@ -115,56 +137,56 @@ Adminer 4.9.4 (2024-10-09)
|
||||
- Editor: Fix building links with array parameters
|
||||
- Clean up the code for PHP < 5.6
|
||||
|
||||
Adminer 4.9.3 (2024-10-02)
|
||||
--------------------------
|
||||
AdminerNeo 4.9.3 (2024-10-02)
|
||||
-----------------------------
|
||||
|
||||
- MySQL, PostgreSQL: Fix queries splitting and string constants
|
||||
- MySQL: Fix where clause for `JSON` column (by SeaEagle)
|
||||
- MySQL: Fix where clause for `JSON` column (by @SeaEagle)
|
||||
- MySQL: Fix editing user's proxy privilege, refactoring
|
||||
- MariaDB: Fix comparing `CURRENT_TIMESTAMP` definition while altering a table
|
||||
- PostgreSQL: Fix editing record that contains a field with `GENERATED ALWAYS` default value
|
||||
- Fix using undefined Min_DB::info property
|
||||
- Do not include unchanged `PARTITION BY` definition into `ALTER TABLE` query
|
||||
- Do not limit unlimited memory while executing queries (by Michael Graß)
|
||||
- Do not limit unlimited memory while executing queries (by @oksiquatzel)
|
||||
- Fix number conversion warning while reading INI settings
|
||||
- Hide invalid edit form if table record is not found
|
||||
- CSS: Fix background color of `<pre>` used as edit field
|
||||
- CSS: Bigger font size for code blocks
|
||||
|
||||
Adminer 4.9.2 (2024-09-18)
|
||||
--------------------------
|
||||
AdminerNeo 4.9.2 (2024-09-18)
|
||||
-----------------------------
|
||||
|
||||
- Fix textarea height for single-line inputs (used typically for SQLite text field)
|
||||
- Fix undefined property in error message if driver does not support error number (e.g. PostgreSQL)
|
||||
- PostgreSQL: Fix search fields configuration (regression from 4.9)
|
||||
- PostgreSQL: Fix search condition for network address types, add macaddr8 type
|
||||
- PostgreSQL: Fix exporting `CREATE TABLE` query with `GENERATED` default values
|
||||
- PostgreSQL: Fix exporting `CREATE TABLE` query with sequence default value (by khoazero123)
|
||||
- PostgreSQL: Fix exporting `CREATE TABLE` query with sequence default value (by @khoazero123)
|
||||
- PostgreSQL: Allow to set connection's sslmode with AdminerLoginSsl plugin
|
||||
- MySQL: Do not show `empty` enum value in strict mode
|
||||
- Editor: Fix searching in tables
|
||||
- Add function to retrieve driver name that can be used in plugins (by Roy Orbison)
|
||||
- Add function to retrieve driver name that can be used in plugins (by @Roy-Orbison)
|
||||
|
||||
Adminer 4.9.1 (2024-09-09)
|
||||
--------------------------
|
||||
AdminerNeo 4.9.1 (2024-09-09)
|
||||
-----------------------------
|
||||
|
||||
- Compatibility with PHP 8.3 (by Sneda8)
|
||||
- Compatibility with PHP 8.3 (by @Sneda8)
|
||||
- Fix compiling jush external files
|
||||
- Improved displaying of long table names in menu
|
||||
- Replace deprecated `<acronym>` with `<abbr>`
|
||||
- Add support for translations in plugins
|
||||
- Add .editorconfig file
|
||||
- MySQL: Add `unix_timestamp` to functions (by Michal Paulovic)
|
||||
- PostgreSQL: Show only accessible databases (by Thomas Daniels)
|
||||
- PostgreSQL: Make data length calculation more accurate (by caltong)
|
||||
- MySQL: Add `unix_timestamp` to functions (by @bbaronSVK)
|
||||
- PostgreSQL: Show only accessible databases (by @thomas-daniels)
|
||||
- PostgreSQL: Make data length calculation more accurate (by @caltong)
|
||||
- PostgreSQL: Fix documentation link for `SERIAL` type
|
||||
- PostgreSQL: Fix undefined properties on PHP 8
|
||||
- Elasticsearch: Fix field selection
|
||||
- AdminerEditForeign: Refactor and fix the plugin
|
||||
- AdminerLoginOtp: Autocomplete hints for OTP input field, code refactoring
|
||||
|
||||
Adminer 4.9 (2024-08-19)
|
||||
------------------------
|
||||
AdminerNeo 4.9 (2024-08-19)
|
||||
---------------------------
|
||||
|
||||
- Validate server input in login form
|
||||
- Validate connection to server in HTTP based drivers
|
||||
@@ -174,22 +196,22 @@ Adminer 4.9 (2024-08-19)
|
||||
- Add new Elasticsearch 7 driver
|
||||
- Set saving to file as a default export option
|
||||
- Improve URL and email detection
|
||||
- Fix AdminerVersionNoverify plugin blocking other plugins to modify HTML head (by Roy Orbitson)
|
||||
- Fix AdminerVersionNoverify plugin blocking other plugins to modify HTML head (by @Roy-Orbison)
|
||||
- Fix several bugs and security issues in AdminerFileUpload plugin
|
||||
- Skip dump of generated columns (by Denitz)
|
||||
- Fix uninitialized string offset (by Adrian Jones)
|
||||
- Skip dump of generated columns (by @Denitz)
|
||||
- Fix uninitialized string offset (by @adrianbj)
|
||||
- Update composer.json
|
||||
- Add script for exporting compiled adminer variants
|
||||
|
||||
Adminer 4.8.2 (2024-03-16)
|
||||
--------------------------
|
||||
AdminerNeo 4.8.2 (2024-03-16)
|
||||
-----------------------------
|
||||
|
||||
- Support multi-line table comments
|
||||
- MySQL: Use `ST_SRID()` instead of `SRID()` for MySQL 8 (PR #418)
|
||||
- PostgreSQL: Don't reset table comments (regression from 4.2.0)
|
||||
- PostgreSQL PDO: Allow editing rows identified by boolean column (PR #380)
|
||||
- Update several translations: lv, bn, fr, it, nl, ru, cs, sk
|
||||
- Allow responsive styles on larger devices
|
||||
- Allow responsive styles on larger devices (by @lucas-sandery)
|
||||
|
||||
Adminer 4.8.1 (2021-05-14)
|
||||
--------------------------
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Licenses
|
||||
========
|
||||
|
||||
You may use Adminer under the terms of either the Apache License Version 2.0
|
||||
You may use AdminerNeo under the terms of either the Apache License Version 2.0
|
||||
or the GNU General Public License (GPL) version 2.
|
||||
|
||||
- [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
53
README.md
53
README.md
@@ -1,20 +1,24 @@
|
||||
Adminer
|
||||
=======
|
||||
AdminerNeo
|
||||
==========
|
||||
|
||||
**Adminer** is a full-featured database management tool written in PHP. It consists of a single file ready to deploy to
|
||||
the target server. As a companion, **Adminer Editor** offers data manipulation for end-users.
|
||||
**AdminerNeo** is a full-featured database management tool written in PHP. It consists of a single file ready to deploy
|
||||
to the target server. As a companion, **AdminerNeo Editor** offers data manipulation for end-users.
|
||||
|
||||
Supported database drivers:
|
||||
- MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, MongoDB
|
||||
- With plugin: SimpleDB, Elasticsearch (beta), Firebird (alpha), ClickHouse (alpha)
|
||||
|
||||
AdminerNeo is based on the [Adminer](https://www.adminer.org/) project by Jakub Vrána.
|
||||
|
||||
<img src="docs/images/screenshot.webp" width="830px" alt="Screenshot"/>
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
- PHP 5.6+ with enabled sessions.
|
||||
|
||||
Migration from original Adminer
|
||||
-------------------------------
|
||||
Migration from Adminer
|
||||
----------------------
|
||||
|
||||
- Remove plugin AdminerTablesFilter (plugins/tables-filter.php).
|
||||
- If you use complex custom theme, you will probably need to adjust a thing or two.
|
||||
@@ -26,19 +30,19 @@ Please, read also 👉 **[What to expect](#what-to-expect)** section before you
|
||||
Usage
|
||||
-----
|
||||
|
||||
Download one for the latest [release files](https://github.com/pematon/adminer/releases), upload to the HTTP server
|
||||
Download one for the latest [release files](https://github.com/adminerneo/adminerneo/releases), upload to the HTTP server
|
||||
with PHP and enjoy 😉 If you are not satisfied with any combination of the database driver and language, you can
|
||||
download the source code and compile your own Adminer:
|
||||
download the source code and compile your own AdminerNeo:
|
||||
|
||||
- Download the source code.
|
||||
- Run `composer install` to install dependencies.
|
||||
- Run compile.php:
|
||||
|
||||
```shell
|
||||
# Adminer
|
||||
# AdminerNeo
|
||||
php compile.php <drivers> <languages>
|
||||
|
||||
# Editor
|
||||
# AdminerNeo Editor
|
||||
php compile.php editor <drivers> <languages>
|
||||
```
|
||||
|
||||
@@ -48,14 +52,14 @@ php compile.php pgsql cs
|
||||
php compile.php mysql,pgsql en,de,cs,sk
|
||||
```
|
||||
|
||||
[Available drivers](https://github.com/pematon/adminer/tree/master/adminer/drivers),
|
||||
[languages](https://github.com/pematon/adminer/tree/master/adminer/lang).
|
||||
[Available drivers](https://github.com/adminerneo/adminerneo/tree/main/adminer/drivers),
|
||||
[languages](https://github.com/adminerneo/adminerneo/tree/main/adminer/lang).
|
||||
|
||||
Security
|
||||
--------
|
||||
|
||||
Adminer does not allow connecting to databases without a password and it rate-limits the connection attempts to protect
|
||||
against brute-force attacks. Still, it is highly recommended to 🔒 **restrict access to Adminer** 🔒 by whitelisting IP
|
||||
AdminerNeo does not allow connecting to databases without a password and it rate-limits the connection attempts to protect
|
||||
against brute-force attacks. Still, it is highly recommended to 🔒 **restrict access to AdminerNeo** 🔒 by whitelisting IP
|
||||
addresses allowed to connect to it, by password-protecting the access in your web server or by enabling security plugins
|
||||
(e.g. to require an OTP).
|
||||
|
||||
@@ -114,19 +118,19 @@ function adminer_object() {
|
||||
include "./adminer.php";
|
||||
```
|
||||
|
||||
[Available plugins](https://github.com/pematon/adminer/tree/master/plugins).
|
||||
[Available plugins](https://github.com/adminerneo/adminerneo/tree/main/plugins).
|
||||
|
||||
Main project files
|
||||
------------------
|
||||
|
||||
- adminer/index.php - Run development version of Adminer.
|
||||
- editor/index.php - Run development version of Adminer Editor.
|
||||
- adminer/index.php - Run development version of AdminerNeo.
|
||||
- editor/index.php - Run development version of AdminerNeo Editor.
|
||||
- editor/example.php - Example customization.
|
||||
- plugins/readme.txt - Plugins for Adminer and Adminer Editor.
|
||||
- plugins/readme.txt - Plugins for AdminerNeo and AdminerNeo Editor.
|
||||
- adminer/plugin.php - Plugin demo.
|
||||
- adminer/sqlite.php - Development version of Adminer with SQLite allowed.
|
||||
- adminer/sqlite.php - Development version of AdminerNeo with SQLite allowed.
|
||||
- editor/sqlite.php - Development version of Editor with SQLite allowed.
|
||||
- adminer/designs.php - Development version of Adminer with adminer.css switcher.
|
||||
- adminer/designs.php - Development version of AdminerNeo with adminer.css switcher.
|
||||
- compile.php - Create a single file version.
|
||||
- lang.php - Update translations.
|
||||
- tests/katalon.html - Katalon Automation Recorder test suite.
|
||||
@@ -134,7 +138,7 @@ Main project files
|
||||
Project history
|
||||
---------------
|
||||
|
||||
Adminer was originally developed by Jakub Vrana, and it can be still found on [official pages](https://www.adminer.org/).
|
||||
Adminer was originally developed by Jakub Vrána, and it can be still found on [official pages](https://www.adminer.org/).
|
||||
Unfortunately, it is not maintained for several years. In the meantime, I (@peterpp) created for my company a set of
|
||||
custom plugins, modern theme, fixed some bugs and practically rewrote the Elasticsearch driver. I also looked closely
|
||||
and contributed to the [AdminerEvo](https://www.adminerevo.org/) project that looked promising. However, I finally
|
||||
@@ -144,7 +148,7 @@ What to expect
|
||||
--------------
|
||||
|
||||
Our top priority is fixing the security issues and reported bugs. But we really want to move forward and transform
|
||||
Adminer to a tool that will keep its simplicity, yet looks much better, is even easier to use and can be configured
|
||||
AdminerNeo to a tool that will keep its simplicity, yet looks much better, is even easier to use and can be configured
|
||||
without requirement of additional plugins.
|
||||
|
||||
### Version 4.x
|
||||
@@ -154,7 +158,7 @@ UI improvements.
|
||||
|
||||
### Version 5
|
||||
|
||||
Bridges will be burned 🔥🔥🔥. It's in development already, so you [can check](https://github.com/pematon/adminer/tree/version-5)
|
||||
Bridges will be burned 🔥🔥🔥. It's in development already, so you [can check](https://github.com/adminerneo/adminerneo/tree/version-5)
|
||||
what's going on. Or you can become the early adopter and help us with testing 😉
|
||||
|
||||
Our goals are:
|
||||
@@ -165,6 +169,3 @@ support dark mode, configurable color variants for production/devel environment.
|
||||
- **Plugins** - Integrate several basic plugins, enable them by optional configuration.
|
||||
- **Codebase** - Prefer code readability before minimalism, use PER coding style, add namespaces.
|
||||
- **Compilation** - Allow to export selected drivers, themes, languages and plugins into a single adminer.php file.
|
||||
|
||||
We are also thinking to change the project's name, so people will clearly distinguish between original Adminer and
|
||||
other forks. Any suggestions are welcome.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Reporting security issues
|
||||
=========================
|
||||
|
||||
To report a security issue, please [open a draft security advisory](https://github.com/pematon/adminer/security/advisories).
|
||||
To report a security issue, please [open a draft security advisory](https://github.com/adminerneo/adminerneo/security/advisories).
|
||||
|
||||
Security issues are handled with top priority. Once acknowledged, a fix should be available and new version released
|
||||
as soon as possible. Security advisories will be made public after a fix and new version have been released,
|
||||
|
@@ -642,8 +642,17 @@ if (isset($_GET["mysql"])) {
|
||||
* @return array
|
||||
*/
|
||||
function collations() {
|
||||
global $connection;
|
||||
|
||||
$return = array();
|
||||
foreach (get_rows("SHOW COLLATION") as $row) {
|
||||
|
||||
// Since MariaDB 10.10, one collation can be compatible with more character sets, so collations no longer have unique IDs.
|
||||
// All combinations can be selected from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY table.
|
||||
$query = min_version('', '10.10', $connection) ?
|
||||
"SELECT CHARACTER_SET_NAME AS Charset, FULL_COLLATION_NAME AS Collation, IS_DEFAULT AS `Default` FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY" :
|
||||
"SHOW COLLATION";
|
||||
|
||||
foreach (get_rows($query) as $row) {
|
||||
if ($row["Default"]) {
|
||||
$return[$row["Charset"]][-1] = $row["Collation"];
|
||||
} else {
|
||||
@@ -651,9 +660,11 @@ if (isset($_GET["mysql"])) {
|
||||
}
|
||||
}
|
||||
ksort($return);
|
||||
|
||||
foreach ($return as $key => $val) {
|
||||
asort($return[$key]);
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
@@ -71,6 +71,11 @@ if (isset($_GET["pgsql"])) {
|
||||
}
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
if (!$this->_link) {
|
||||
$this->error = "Invalid connection";
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = @pg_query($this->_link, $query);
|
||||
$this->error = "";
|
||||
if (!$result) {
|
||||
@@ -497,12 +502,17 @@ ORDER BY connamespace, conname") as $row) {
|
||||
|
||||
function drop_databases($databases) {
|
||||
global $connection;
|
||||
|
||||
$connection->close();
|
||||
|
||||
return apply_queries("DROP DATABASE", $databases, 'idf_escape');
|
||||
}
|
||||
|
||||
function rename_database($name, $collation) {
|
||||
//! current database cannot be renamed
|
||||
global $connection;
|
||||
|
||||
$connection->close();
|
||||
|
||||
return queries("ALTER DATABASE " . idf_escape(DB) . " RENAME TO " . idf_escape($name));
|
||||
}
|
||||
|
||||
@@ -776,8 +786,6 @@ AND typelem = 0"
|
||||
}
|
||||
|
||||
function create_sql($table, $auto_increment, $style) {
|
||||
global $connection;
|
||||
$return = '';
|
||||
$return_parts = array();
|
||||
$sequences = array();
|
||||
|
||||
@@ -812,8 +820,11 @@ AND typelem = 0"
|
||||
: "SELECT * FROM $sequence_name"
|
||||
);
|
||||
$sq = reset($rows);
|
||||
$sequences[] = ($style == "DROP+CREATE" ? "DROP SEQUENCE IF EXISTS $sequence_name;\n" : "")
|
||||
. "CREATE SEQUENCE $sequence_name INCREMENT $sq[increment_by] MINVALUE $sq[min_value] MAXVALUE $sq[max_value]" . ($auto_increment && $sq['last_value'] ? " START $sq[last_value]" : "") . " CACHE $sq[cache_value];";
|
||||
|
||||
$sequences[] = ($style == "DROP+CREATE" ? "DROP SEQUENCE IF EXISTS $sequence_name;\n" : "") .
|
||||
"CREATE SEQUENCE $sequence_name INCREMENT $sq[increment_by] MINVALUE $sq[min_value] MAXVALUE $sq[max_value]" .
|
||||
($auto_increment && $sq['last_value'] ? " START " . ($sq["last_value"] + 1) : "") .
|
||||
" CACHE $sq[cache_value];";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,7 @@ class Adminer {
|
||||
* @return string HTML code
|
||||
*/
|
||||
function name() {
|
||||
return "<a id='h1' href='" . h(HOME_URL) . "'>Adminer</a>";
|
||||
return "<a id='h1' href='" . h(HOME_URL) . "'>AdminerNeo</a>";
|
||||
}
|
||||
|
||||
/** Connection parameters
|
||||
@@ -1046,7 +1046,7 @@ class Adminer {
|
||||
<?php if ($missing != "auth"): ?>
|
||||
<span class="version">
|
||||
<?php echo $VERSION; ?>
|
||||
<a href="https://github.com/pematon/adminer/releases"<?php echo target_blank(); ?> id="version">
|
||||
<a href="https://github.com/adminerneo/adminerneo/releases"<?php echo target_blank(); ?> id="version">
|
||||
<?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?>
|
||||
</a>
|
||||
</span>
|
||||
|
@@ -143,7 +143,7 @@ function csp() {
|
||||
[
|
||||
// 'self' is a fallback for browsers not supporting 'strict-dynamic', 'unsafe-inline' is a fallback for browsers not supporting 'nonce-'
|
||||
"script-src" => "'self' 'unsafe-inline' 'nonce-" . get_nonce() . "' 'strict-dynamic'",
|
||||
"connect-src" => "'self' https://api.github.com/repos/pematon/adminer/releases/latest",
|
||||
"connect-src" => "'self' https://api.github.com/repos/adminerneo/adminerneo/releases/latest",
|
||||
"frame-src" => "'self'",
|
||||
"object-src" => "'none'",
|
||||
"base-uri" => "'none'",
|
||||
|
@@ -156,14 +156,14 @@ if (isset($_POST["lang"]) && verify_token()) { // $error not yet available
|
||||
}
|
||||
|
||||
$available_languages = get_available_languages();
|
||||
$LANG = $available_languages[0];
|
||||
$LANG = array_keys($available_languages)[0];
|
||||
|
||||
if (isset($available_languages[$_COOKIE["adminer_lang"]])) {
|
||||
if (isset($_COOKIE["adminer_lang"]) && isset($available_languages[$_COOKIE["adminer_lang"]])) {
|
||||
cookie("adminer_lang", $_COOKIE["adminer_lang"]);
|
||||
$LANG = $_COOKIE["adminer_lang"];
|
||||
} elseif (isset($available_languages[$_SESSION["lang"]])) {
|
||||
$LANG = $_SESSION["lang"];
|
||||
} else {
|
||||
} elseif (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) {
|
||||
$accept_language = [];
|
||||
preg_match_all('~([-a-z]+)(;q=([0-9.]+))?~', str_replace("_", "-", strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"])), $matches, PREG_SET_ORDER);
|
||||
foreach ($matches as $match) {
|
||||
|
@@ -1,2 +1,2 @@
|
||||
<?php
|
||||
$VERSION = "4.13";
|
||||
$VERSION = "4.14";
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Adminer - Database management in a single PHP file
|
||||
* AdminerNeo - Database management in a single PHP file
|
||||
*
|
||||
* @link https://github.com/pematon/adminer
|
||||
* @link https://github.com/adminerneo/adminerneo
|
||||
* @author Jakub Vrana (https://www.vrana.cz/)
|
||||
* @author Peter Knut
|
||||
* @copyright 2007-2021 Jakub Vrana, 2024 Peter Knut
|
||||
|
@@ -548,7 +548,7 @@ function foreignAddRow() {
|
||||
this.onchange = function () { };
|
||||
var selects = qsa('select', row);
|
||||
for (var i=0; i < selects.length; i++) {
|
||||
selects[i].name = selects[i].name.replace(']', '1]');
|
||||
selects[i].name = selects[i].name.replace(/\d+]/, '1$&');
|
||||
selects[i].selectedIndex = 0;
|
||||
}
|
||||
parentTag(this, 'table').appendChild(row);
|
||||
|
@@ -106,7 +106,7 @@ function verifyVersion(baseUrl, token) {
|
||||
// Dummy value to prevent repeated verifications after AJAX failure.
|
||||
cookie('adminer_version=0', 1);
|
||||
|
||||
ajax('https://api.github.com/repos/pematon/adminer/releases/latest', (request) => {
|
||||
ajax('https://api.github.com/repos/adminerneo/adminerneo/releases/latest', (request) => {
|
||||
const response = JSON.parse(request.responseText);
|
||||
|
||||
const version = response.tag_name.replace(/^\D*/, '');
|
||||
@@ -528,7 +528,7 @@ function selectSearchSearch() {
|
||||
// Sorting.
|
||||
(function() {
|
||||
let placeholderRow = null, nextRow = null, dragHelper = null;
|
||||
let startY, minY, maxY;
|
||||
let startScrollY, startY, minY, maxY, lastPointerY;
|
||||
|
||||
/**
|
||||
* Initializes sortable list of DIV elements.
|
||||
@@ -569,6 +569,7 @@ function selectSearchSearch() {
|
||||
const pointerY = getPointerY(event);
|
||||
|
||||
const parent = row.parentNode;
|
||||
startScrollY = window.scrollY;
|
||||
startY = pointerY - getOffsetTop(row);
|
||||
minY = getOffsetTop(parent);
|
||||
maxY = minY + parent.offsetHeight - row.offsetHeight;
|
||||
@@ -612,6 +613,7 @@ function selectSearchSearch() {
|
||||
|
||||
window.addEventListener("mousemove", updateSorting);
|
||||
window.addEventListener("touchmove", updateSorting);
|
||||
window.addEventListener("scroll", updateSorting);
|
||||
|
||||
window.addEventListener("mouseup", finishSorting);
|
||||
window.addEventListener("touchend", finishSorting);
|
||||
@@ -620,27 +622,51 @@ function selectSearchSearch() {
|
||||
|
||||
function updateSorting(event) {
|
||||
const pointerY = getPointerY(event);
|
||||
const scrollingBoundary = 30;
|
||||
const speedCoefficient = 8;
|
||||
|
||||
let top = Math.min(Math.max(pointerY - startY, minY), maxY);
|
||||
dragHelper.style.top = `${top}px`;
|
||||
|
||||
const parent = placeholderRow.parentNode;
|
||||
top = top - minY + parent.offsetTop;
|
||||
|
||||
let sibling;
|
||||
if (top > placeholderRow.offsetTop + placeholderRow.offsetHeight / 2) {
|
||||
sibling = !nextRow.classList.contains("no-sort") ? nextRow.nextElementSibling : nextRow;
|
||||
} else if (top + placeholderRow.offsetHeight < placeholderRow.offsetTop + placeholderRow.offsetHeight / 2) {
|
||||
sibling = placeholderRow.previousElementSibling;
|
||||
} else {
|
||||
sibling = nextRow;
|
||||
// If mouse pointer is over the top boundary, scroll page down.
|
||||
let distance = pointerY - scrollingBoundary;
|
||||
if (distance < 0 && window.scrollY > 0) {
|
||||
window.scrollBy(0, distance / speedCoefficient);
|
||||
return;
|
||||
}
|
||||
|
||||
if (sibling !== nextRow) {
|
||||
const parent = placeholderRow.parentNode;
|
||||
// If mouse pointer is under the bottom boundary, scroll page up.
|
||||
distance = pointerY - window.innerHeight + scrollingBoundary;
|
||||
if (distance > 0 && window.scrollY + window.innerHeight < document.documentElement.scrollHeight) {
|
||||
window.scrollBy(0, distance / speedCoefficient);
|
||||
return;
|
||||
}
|
||||
|
||||
nextRow = sibling;
|
||||
if (sibling) {
|
||||
// Move helper row to the pointer position.
|
||||
let top = Math.min(Math.max(pointerY - startY + window.scrollY - startScrollY, minY), maxY);
|
||||
dragHelper.style.top = `${top}px`;
|
||||
|
||||
// Find a new position for the placeholder.
|
||||
const parent = placeholderRow.parentNode;
|
||||
let oldNextRow = nextRow;
|
||||
top = top - minY + parent.offsetTop;
|
||||
|
||||
let testingRow = placeholderRow;
|
||||
do {
|
||||
if (top > testingRow.offsetTop + testingRow.offsetHeight / 2 + 1) {
|
||||
if (!nextRow.classList.contains("no-sort")) {
|
||||
testingRow = nextRow;
|
||||
nextRow = nextRow.nextElementSibling;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} else if (top + testingRow.offsetHeight < testingRow.offsetTop + testingRow.offsetHeight / 2 - 1) {
|
||||
nextRow = testingRow = testingRow.previousElementSibling;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} while (nextRow);
|
||||
|
||||
// Move the placeholder to a new position.
|
||||
if (nextRow !== oldNextRow) {
|
||||
if (nextRow) {
|
||||
parent.insertBefore(placeholderRow, nextRow);
|
||||
} else {
|
||||
parent.appendChild(placeholderRow);
|
||||
@@ -661,6 +687,7 @@ function selectSearchSearch() {
|
||||
|
||||
window.removeEventListener("mousemove", updateSorting);
|
||||
window.removeEventListener("touchmove", updateSorting);
|
||||
window.removeEventListener("scroll", updateSorting);
|
||||
|
||||
window.removeEventListener("mouseup", finishSorting);
|
||||
window.removeEventListener("touchend", finishSorting);
|
||||
@@ -670,10 +697,12 @@ function selectSearchSearch() {
|
||||
function getPointerY(event) {
|
||||
if (event.type.includes("touch")) {
|
||||
const touch = event.touches[0] || event.changedTouches[0];
|
||||
return touch.clientY;
|
||||
} else {
|
||||
return event.clientY;
|
||||
lastPointerY = touch.clientY;
|
||||
} else if (event.clientY !== undefined) {
|
||||
lastPointerY = event.clientY;
|
||||
}
|
||||
|
||||
return lastPointerY;
|
||||
}
|
||||
})();
|
||||
|
||||
|
@@ -520,8 +520,8 @@ $file = preg_replace('~"\.\./vendor/vrana/jush/modules/(jush\.js)"~', $replace,
|
||||
$file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file);
|
||||
$file = php_shrink($file);
|
||||
|
||||
@mkdir("temp", 0777, true);
|
||||
$filename = "temp/$project"
|
||||
@mkdir("export", 0777, true);
|
||||
$filename = "export/$project"
|
||||
. (is_dev_version() ? "" : "-$VERSION")
|
||||
. ($single_driver ? "-$single_driver" : "")
|
||||
. ($single_language ? "-$single_language" : "")
|
||||
|
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"name": "pematon/adminer",
|
||||
"name": "adminerneo/adminerneo",
|
||||
"description": "Database management in a single PHP file.",
|
||||
"homepage": "https://github.com/pematon/adminer",
|
||||
"homepage": "https://github.com/adminerneo/adminerneo",
|
||||
"keywords": [
|
||||
"database"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/pematon/adminer/issues",
|
||||
"forum": "https://github.com/pematon/adminer/discussions",
|
||||
"source": "https://github.com/pematon/adminer"
|
||||
"issues": "https://github.com/adminerneo/adminerneo/issues",
|
||||
"forum": "https://github.com/adminerneo/adminerneo/discussions",
|
||||
"source": "https://github.com/adminerneo/adminerneo"
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jakub Vrána",
|
||||
"homepage": "https://www.vrana.cz/"
|
||||
"name": "Peter Knut"
|
||||
},
|
||||
{
|
||||
"name": "Peter Knut"
|
||||
"name": "Jakub Vrána",
|
||||
"homepage": "https://www.vrana.cz/"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
@@ -61,11 +61,11 @@
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/pematon/jush.git"
|
||||
"url": "https://github.com/peterpp/jush.git"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/vrana/jsshrink.git"
|
||||
"url": "https://github.com/peterpp/js-shrink.git"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -535,7 +535,7 @@ input[type="file"]::-ms-browse {
|
||||
background: #4c3957;
|
||||
color: #fff;
|
||||
padding: 0.5em 0.8em 0.6em;
|
||||
margin: 0;
|
||||
margin: 0 0.5em;
|
||||
border-style: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -557,7 +557,7 @@ input[type="file"]::-webkit-file-upload-button {
|
||||
background: #4c3957;
|
||||
color: #fff;
|
||||
padding: 0.5em 0.8em 0.6em;
|
||||
margin: 0;
|
||||
margin: 0 0.5em;
|
||||
border-style: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -571,24 +571,24 @@ input[type="file"]:disabled::-webkit-file-upload-button {
|
||||
background-color: rgba(76, 57, 87, 0.35);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
input[type="file"]::-moz-file-upload-button {
|
||||
input[type="file"]::file-selector-button {
|
||||
display: inline-block;
|
||||
font-size: 85%;
|
||||
text-align: center;
|
||||
background: #4c3957;
|
||||
color: #fff;
|
||||
padding: 0.5em 0.8em 0.6em;
|
||||
margin: 0;
|
||||
margin: 0 0.5em;
|
||||
border-style: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
input[type="file"]:hover::-moz-file-upload-button,
|
||||
input[type="file"]:focus::-moz-file-upload-button {
|
||||
input[type="file"]:hover::file-selector-button,
|
||||
input[type="file"]:focus::file-selector-button {
|
||||
color: #fff;
|
||||
background: #ec5f12;
|
||||
text-decoration: none;
|
||||
}
|
||||
input[type="file"]:disabled::-moz-file-upload-button {
|
||||
input[type="file"]:disabled::file-selector-button {
|
||||
background-color: rgba(76, 57, 87, 0.35);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
BIN
docs/images/screenshot.webp
Normal file
BIN
docs/images/screenshot.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
@@ -608,7 +608,7 @@ qsl('div').onclick = whisperClick;", "")
|
||||
<?php if ($missing != "auth"): ?>
|
||||
<span class="version">
|
||||
<?php echo $VERSION; ?>
|
||||
<a href="https://github.com/pematon/adminer/releases"<?php echo target_blank(); ?> id="version">
|
||||
<a href="https://github.com/adminerneo/adminerneo/releases"<?php echo target_blank(); ?> id="version">
|
||||
<?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?>
|
||||
</a>
|
||||
</span>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Adminer Editor - Compact database editor for end-users
|
||||
* AdminerNeo Editor - Compact database editor for end-users
|
||||
*
|
||||
* @link https://github.com/pematon/adminer
|
||||
* @link https://github.com/adminerneo/adminerneo
|
||||
* @author Jakub Vrana (https://www.vrana.cz/)
|
||||
* @author Peter Knut
|
||||
* @copyright 2009-2021 Jakub Vrana, 2024 Peter Knut
|
||||
|
Reference in New Issue
Block a user