mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
Plugins: Display doc-comments at server overview
This commit is contained in:
@@ -45,7 +45,13 @@ if (
|
|||||||
echo "<p>" . lang('%s version: %s through PHP extension %s', $drivers[DRIVER], "<b>" . h($connection->server_info) . "</b>", "<b>$connection->extension</b>") . "\n";
|
echo "<p>" . lang('%s version: %s through PHP extension %s', $drivers[DRIVER], "<b>" . h($connection->server_info) . "</b>", "<b>$connection->extension</b>") . "\n";
|
||||||
echo "<p>" . lang('Logged as: %s', "<b>" . h(logged_user()) . "</b>") . "\n";
|
echo "<p>" . lang('Logged as: %s', "<b>" . h(logged_user()) . "</b>") . "\n";
|
||||||
if (isset($adminer->plugins) && is_array($adminer->plugins)) {
|
if (isset($adminer->plugins) && is_array($adminer->plugins)) {
|
||||||
echo "<p>" . lang('Loaded plugins') . ": <b>" . implode("</b>, <b>", array_map('get_class', $adminer->plugins)) . "</b>\n";
|
echo "<p>" . lang('Loaded plugins') . ":\n<ul>\n";
|
||||||
|
foreach ($adminer->plugins as $plugin) {
|
||||||
|
$reflection = new \ReflectionObject($plugin);
|
||||||
|
preg_match('~^/[\s*]+(.+)\n~', $reflection->getDocComment(), $match);
|
||||||
|
echo "<li><b>" . get_class($plugin) . "</b>" . h($match ? ": $match[1]" : "") . "\n";
|
||||||
|
}
|
||||||
|
echo "</ul>\n";
|
||||||
}
|
}
|
||||||
$databases = $adminer->databases();
|
$databases = $adminer->databases();
|
||||||
if ($databases) {
|
if ($databases) {
|
||||||
|
Reference in New Issue
Block a user