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