mirror of
https://github.com/vrana/adminer.git
synced 2025-08-29 17:19:52 +02:00
Avoid showing version on login page (and css/js version)
Thanks to MisterDuval (https://github.com/adminerevo/adminerevo/pull/180)
This commit is contained in:
@@ -953,8 +953,11 @@ class Adminer {
|
||||
global $VERSION, $jush, $drivers, $connection;
|
||||
?>
|
||||
<h1>
|
||||
<?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span>
|
||||
<?php echo $this->name(); ?>
|
||||
<?php if ($missing != "auth"): ?>
|
||||
<span class="version"><?php echo $VERSION; ?></span>
|
||||
<a href="https://www.adminer.org/#download"<?php echo target_blank(); ?> id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a>
|
||||
<?php endif; ?>
|
||||
</h1>
|
||||
<?php
|
||||
if ($missing == "auth") {
|
||||
|
@@ -443,7 +443,7 @@ $file = str_replace('<?php echo script_src("static/editing.js"); ?>' . "\n", "",
|
||||
$file = preg_replace('~\s+echo script_src\("\.\./externals/jush/modules/jush-(textarea|txt|js|\$jush)\.js"\);~', '', $file);
|
||||
$file = str_replace('<link rel="stylesheet" type="text/css" href="../vendor/vrana/jush/jush.css">' . "\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)~', '<?php echo h(' . $replace . '); ?>', $file);
|
||||
$file = preg_replace('~"\.\./adminer/static/(functions\.js)"~', $replace, $file);
|
||||
$file = preg_replace('~\.\./adminer/static/([^\'"]*)~', '" . h(' . $replace . ') . "', $file);
|
||||
|
@@ -580,8 +580,11 @@ qsl('div').onclick = whisperClick;", "")
|
||||
global $VERSION;
|
||||
?>
|
||||
<h1>
|
||||
<?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span>
|
||||
<?php echo $this->name(); ?>
|
||||
<?php if ($missing != "auth"): ?>
|
||||
<span class="version"><?php echo $VERSION; ?></span>
|
||||
<a href="https://www.adminer.org/editor/#download"<?php echo target_blank(); ?> id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a>
|
||||
<?php endif; ?>
|
||||
</h1>
|
||||
<?php
|
||||
if ($missing == "auth") {
|
||||
|
Reference in New Issue
Block a user