From 47ccfa2a2e124bf73a4e76316a2526a123a51056 Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Sat, 17 Aug 2024 00:47:23 +0200 Subject: [PATCH] Avoid showing version on login page (and css/js version) Thanks to MisterDuval (https://github.com/adminerevo/adminerevo/pull/180) --- adminer/include/adminer.inc.php | 7 +++++-- compile.php | 2 +- editor/include/adminer.inc.php | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index e2c099a4..157727e1 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -953,8 +953,11 @@ class Adminer { global $VERSION, $jush, $drivers, $connection; ?>

-name(); ?> - id="version"> + name(); ?> + + + id="version"> +

' . "\n", "", $file = preg_replace('~\s+echo script_src\("\.\./externals/jush/modules/jush-(textarea|txt|js|\$jush)\.js"\);~', '', $file); $file = str_replace('' . "\n", "", $file); $file = preg_replace_callback("~compile_file\\('([^']+)'(?:, '([^']*)')?\\)~", 'compile_file', $file); // integrate static files -$replace = 'preg_replace("~\\\\\\\\?.*~", "", ME) . "?file=\1&version=' . $VERSION . '"'; +$replace = 'preg_replace("~\\\\\\\\?.*~", "", ME) . "?file=\1&version=' . substr(md5(microtime()), 0, 8) . '"'; $file = preg_replace('~\.\./adminer/static/(default\.css|favicon\.ico)~', '', $file); $file = preg_replace('~"\.\./adminer/static/(functions\.js)"~', $replace, $file); $file = preg_replace('~\.\./adminer/static/([^\'"]*)~', '" . h(' . $replace . ') . "', $file); diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 1198f2f0..6ed2001d 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -580,8 +580,11 @@ qsl('div').onclick = whisperClick;", "") global $VERSION; ?>

-name(); ?> - id="version"> + name(); ?> + + + id="version"> +