]> git.joonet.de Git - adminer.git/commitdiff
Function to retrieve driver name
authorRoy-Orbison <Roy-Orbison@users.noreply.github.com>
Tue, 31 Aug 2021 00:27:30 +0000 (09:57 +0930)
committerJakub Vrana <jakub@vrana.cz>
Wed, 19 Feb 2025 10:16:38 +0000 (11:16 +0100)
Plugins cannot access $drivers global after compilation.

adminer/include/driver.inc.php

index bdee7a8d85eb625c033ad51f9fd7a85256eae85c..8bcb242e5978a8640ec54c2c3324612272a84cbb 100644 (file)
@@ -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;