mirror of
https://github.com/vrana/adminer.git
synced 2025-08-14 02:23:59 +02:00
Plugins: Method bodyClass() to add <body class> (fix #309)
This commit is contained in:
@@ -108,6 +108,11 @@ class Adminer {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Print extra classes in <body class>; must start with a space */
|
||||
function bodyClass(): void {
|
||||
echo " adminer";
|
||||
}
|
||||
|
||||
/** Get URLs of the CSS files
|
||||
* @return list<string>
|
||||
*/
|
||||
|
@@ -57,7 +57,9 @@ function page_header(string $title, string $error = "", $breadcrumb = array(), s
|
||||
foreach ($css as $val) {
|
||||
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";
|
||||
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));
|
||||
|
Reference in New Issue
Block a user