Skip to content

Commit c83b67a

Browse files
committed
Fixing adminer.
1 parent fbefe9f commit c83b67a

File tree

3 files changed

+12
-22
lines changed

3 files changed

+12
-22
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"php": ">=8.2",
3030
"bjeavons/zxcvbn-php": "^1.4",
3131
"contributte/console": "^0.10.0",
32-
"dg/adminer-custom": "^3.3",
32+
"dg/adminer-custom": "=3.2",
3333
"firebase/php-jwt": "^6.11",
3434
"forxer/gravatar": "^5.0",
3535
"guzzlehttp/guzzle": "^7.10",

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/adminer/index.php

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
<?php
22

3-
/*if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) || !isset($_SERVER['REMOTE_ADDR']) ||
4-
!in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1']))
5-
{
6-
header('HTTP/1.1 403 Forbidden');
7-
echo 'Adminer is available only from localhost';
8-
for ($i = 2e3; $i; $i--) echo substr(" \t\r\n", rand(0, 3), 1);
9-
exit;
10-
}*/
3+
$index = __DIR__ . '/../../vendor/dg/adminer-custom/index.php';
114

12-
13-
$root = __DIR__ . '/../../vendor/dg/adminer-custom';
14-
15-
if (!is_file($root . '/index.php')) {
5+
if (!is_file($index)) {
166
echo "Install Adminer using `composer install`\n";
177
exit(1);
188
}
199

20-
21-
require $root . '/index.php';
10+
touch(__DIR__ . '/adminer.css');
11+
require $index;

0 commit comments

Comments
 (0)