]> git.joonet.de Git - adminer.git/commitdiff
Plugins: Display doc-comments at server overview
authorJakub Vrana <jakub@vrana.cz>
Sun, 23 Mar 2025 17:34:13 +0000 (18:34 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sun, 23 Mar 2025 19:22:41 +0000 (20:22 +0100)
adminer/include/connect.inc.php

index 5c575954047b5394f85dda04afe65c352069921e..5f2f2e767ba654ffb646d504bcf7b29b75762d5c 100644 (file)
@@ -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('Logged as: %s', "<b>" . h(logged_user()) . "</b>") . "\n";
                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();
                if ($databases) {