Plugins: Methods showVariables() and showStatus() (bug #1157)

This commit is contained in:
Jakub Vrana
2025-10-26 15:15:10 +01:00
parent c2be05f0e9
commit 1c008b7d71
3 changed files with 16 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
## Adminer dev
- Plugins: Methods showVariables() and showStatus() (bug #1157)
## Adminer 5.4.1 (released 2025-09-26)
- SQL command: Unlink NULL primary keys

View File

@@ -1134,6 +1134,20 @@ class Adminer {
echo "</ul>\n";
}
/** Get server variables
* @return list<string[]> [[$name, $value]]
*/
function showVariables(): array {
return show_variables();
}
/** Get status variables
* @return list<string[]> [[$name, $value]]
*/
function showStatus(): array {
return show_status();
}
/** Get process list
* @return list<string[]> [$row]
*/

View File

@@ -4,7 +4,7 @@ namespace Adminer;
$status = isset($_GET["status"]);
page_header($status ? lang('Status') : lang('Variables'));
$variables = ($status ? show_status() : show_variables());
$variables = ($status ? adminer()->showStatus() : adminer()->showVariables());
if (!$variables) {
echo "<p class='message'>" . lang('No rows.') . "\n";
} else {