mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 06:37:33 +02:00
Plugins: Method bodyClass() to add <body class> (fix #309)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
## Adminer dev
|
## Adminer dev
|
||||||
|
- Plugins: Method bodyClass() to add <body class>
|
||||||
|
|
||||||
## Adminer 5.2.1 (released 2025-04-11)
|
## Adminer 5.2.1 (released 2025-04-11)
|
||||||
- Fix search anywhere (bug #1004, regression from 5.1.1)
|
- Fix search anywhere (bug #1004, regression from 5.1.1)
|
||||||
@@ -48,8 +49,8 @@
|
|||||||
- CSS: Allow more custom styles with dark mode (bug #925)
|
- CSS: Allow more custom styles with dark mode (bug #925)
|
||||||
- CSS: Increase maximum width of string edit (bug #930)
|
- CSS: Increase maximum width of string edit (bug #930)
|
||||||
- CSS: Increase space after SQL result (bug #937)
|
- CSS: Increase space after SQL result (bug #937)
|
||||||
- Plugins: autoload plugins from adminer-plugins/
|
- Plugins: Autoload plugins from adminer-plugins/
|
||||||
- Plugins: configure plugins with adminer-plugins.php
|
- Plugins: Configure plugins with adminer-plugins.php
|
||||||
- Plugins: Display loaded plugins in server overview
|
- Plugins: Display loaded plugins in server overview
|
||||||
- New plugin: AI prompt in SQL command generating the queries with Google Gemini
|
- New plugin: AI prompt in SQL command generating the queries with Google Gemini
|
||||||
- New plugin: Verify new versions from GitHub
|
- New plugin: Verify new versions from GitHub
|
||||||
|
@@ -108,6 +108,11 @@ class Adminer {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Print extra classes in <body class>; must start with a space */
|
||||||
|
function bodyClass(): void {
|
||||||
|
echo " adminer";
|
||||||
|
}
|
||||||
|
|
||||||
/** Get URLs of the CSS files
|
/** Get URLs of the CSS files
|
||||||
* @return list<string>
|
* @return list<string>
|
||||||
*/
|
*/
|
||||||
|
@@ -57,7 +57,9 @@ function page_header(string $title, string $error = "", $breadcrumb = array(), s
|
|||||||
foreach ($css as $val) {
|
foreach ($css as $val) {
|
||||||
echo "<link rel='stylesheet'" . (preg_match('~-dark\.~', $val) && !$dark ? $media : "") . " href='" . h($val) . "'>\n";
|
echo "<link rel='stylesheet'" . (preg_match('~-dark\.~', $val) && !$dark ? $media : "") . " href='" . h($val) . "'>\n";
|
||||||
}
|
}
|
||||||
echo "\n<body class='" . lang('ltr') . " nojs'>\n";
|
echo "\n<body class='" . lang('ltr') . " nojs";
|
||||||
|
adminer()->bodyClass();
|
||||||
|
echo "'>\n";
|
||||||
$filename = get_temp_dir() . "/adminer.version";
|
$filename = get_temp_dir() . "/adminer.version";
|
||||||
if (!$_COOKIE["adminer_version"] && function_exists('openssl_verify') && file_exists($filename) && filemtime($filename) + 86400 > time()) { // 86400 - 1 day in seconds
|
if (!$_COOKIE["adminer_version"] && function_exists('openssl_verify') && file_exists($filename) && filemtime($filename) + 86400 > time()) { // 86400 - 1 day in seconds
|
||||||
$version = unserialize(file_get_contents($filename));
|
$version = unserialize(file_get_contents($filename));
|
||||||
|
@@ -70,6 +70,10 @@ class Adminer {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function bodyClass(): void {
|
||||||
|
echo " editor";
|
||||||
|
}
|
||||||
|
|
||||||
function css() {
|
function css() {
|
||||||
$return = array();
|
$return = array();
|
||||||
foreach (array("", "-dark") as $mode) {
|
foreach (array("", "-dark") as $mode) {
|
||||||
|
Reference in New Issue
Block a user