mirror of
https://github.com/vrana/adminer.git
synced 2026-01-22 07:23:10 +01:00
Refactor drivers definition and compilation
- Rename 'server' driver to 'mysql' - MySQL driver is no longer the required default - Fix compiled SQLite single-driver Adminer - Allow to compile only selected drivers
This commit is contained in:
@@ -2,16 +2,16 @@
|
||||
function adminer_object() {
|
||||
include_once "../plugins/plugin.php";
|
||||
include_once "../plugins/login-password-less.php";
|
||||
|
||||
|
||||
class AdminerCustomization extends AdminerPlugin {
|
||||
function loginFormField($name, $heading, $value) {
|
||||
return parent::loginFormField($name, $heading, str_replace('value="server"', 'value="sqlite"', $value));
|
||||
return parent::loginFormField($name, $heading, str_replace('value="mysql"', 'value="sqlite"', $value));
|
||||
}
|
||||
function database() {
|
||||
return "PATH_TO_YOUR_SQLITE_HERE";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return new AdminerCustomization(array(
|
||||
// TODO: inline the result of password_hash() so that the password is not visible in source codes
|
||||
new AdminerLoginPasswordLess(password_hash("YOUR_PASSWORD_HERE", PASSWORD_DEFAULT)),
|
||||
|
||||
Reference in New Issue
Block a user