From: Roy-Orbison Date: Tue, 31 Aug 2021 00:27:30 +0000 (+0930) Subject: Function to retrieve driver name X-Git-Tag: v4.16.0~96 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=d91bd659a5b0d58796274ed84c2b9f67c70131ea;p=adminer.git Function to retrieve driver name Plugins cannot access $drivers global after compilation. --- diff --git a/adminer/include/driver.inc.php b/adminer/include/driver.inc.php index bdee7a8d..8bcb242e 100644 --- a/adminer/include/driver.inc.php +++ b/adminer/include/driver.inc.php @@ -11,6 +11,15 @@ function add_driver($id, $name) { $drivers[$id] = $name; } +/** Get driver name +* @param string +* @return string +*/ +function get_driver($id) { + global $drivers; + return $drivers[$id]; +} + /*abstract*/ class Min_SQL { var $_conn;