forked from vrana/adminer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.php
34 lines (30 loc) · 1.06 KB
/
start.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
function adminer_object()
{
// required to run any plugin
include_once __DIR__ . '/plugins/plugin.php';
// autoloader
foreach (glob(__DIR__ . '/plugins/*.php') as $filename) {
include_once $filename;
}
$config = is_file($configFile = __DIR__ . '/config/local/config.php') ? include $configFile : [];
$servers = is_file($serverConfigFile = __DIR__ . '/config/local/servers.php') ? include $serverConfigFile : [];
$adminer = new AdminerPlugin([]);
$plugins = [
new AdminerLoginServers($servers),
new AdminerDumpBz2,
new AdminerDumpDate,
new AdminerTablesFilter,
new AdminerLogoLink,
new AdminerEnumOption,
new AdminerPrettyJsonColumn($adminer),
new AdminerTableStructure,
new AdminerTableIndexesStructure,
new PepaLinhaFix,
];
empty($config['development_mode']) or $plugins[] = new AdminerLoginPasswordLess;
$adminer->plugins = $plugins;
return $adminer;
}
// include original Adminer or Adminer Editor
include __DIR__ . '/adminer.php';