mirror of
https://github.com/vrana/adminer.git
synced 2025-08-05 06:07:57 +02:00
Use Adminer\Plugins
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
function adminer_object() {
|
||||
include_once "../plugins/plugin.php";
|
||||
include_once "../plugins/designs.php";
|
||||
$designs = array();
|
||||
foreach (glob("../designs/*/*.css") as $filename) {
|
||||
$designs[$filename] = basename(dirname($filename));
|
||||
}
|
||||
return new AdminerPlugin(array(
|
||||
return new Adminer\Plugins(array(
|
||||
new AdminerDesigns($designs),
|
||||
));
|
||||
}
|
||||
|
@@ -2,10 +2,9 @@
|
||||
// To create Adminer just for Elasticsearch, run `../compile.php elastic`.
|
||||
|
||||
function adminer_object() {
|
||||
include_once "../plugins/plugin.php";
|
||||
include_once "../plugins/login-password-less.php";
|
||||
include_once "../plugins/drivers/elastic.php";
|
||||
return new AdminerPlugin(array(
|
||||
return new Adminer\Plugins(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)),
|
||||
));
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
// any method change in this file should be transferred to editor/include/adminer.inc.php and plugins/plugin.php
|
||||
// any method change in this file should be transferred to editor/include/adminer.inc.php and plugins.inc.php
|
||||
|
||||
class Adminer {
|
||||
public $operators; ///< @var list<string> operators used in select, null for all operators
|
||||
|
@@ -1,8 +1,7 @@
|
||||
<?php
|
||||
function adminer_object() {
|
||||
include_once "../plugins/plugin.php";
|
||||
include_once "../plugins/login-password-less.php";
|
||||
return new AdminerPlugin(array(
|
||||
return new Adminer\Plugins(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)),
|
||||
));
|
||||
|
@@ -1,9 +1,8 @@
|
||||
<?php
|
||||
function adminer_object() {
|
||||
include_once "../plugins/plugin.php";
|
||||
include_once "../plugins/login-password-less.php";
|
||||
|
||||
class AdminerCustomization extends AdminerPlugin {
|
||||
class AdminerCustomization extends Adminer\Plugins {
|
||||
function loginFormField($name, $heading, $value) {
|
||||
return parent::loginFormField($name, $heading, str_replace('value="server"', 'value="sqlite"', $value));
|
||||
}
|
||||
|
Reference in New Issue
Block a user