]> git.joonet.de Git - adminer.git/commitdiff
Use Adminer\Plugins
authorJakub Vrana <jakub@vrana.cz>
Wed, 26 Mar 2025 10:10:37 +0000 (11:10 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 26 Mar 2025 10:10:37 +0000 (11:10 +0100)
adminer/designs.php
adminer/elastic.php
adminer/include/adminer.inc.php
adminer/sqlite.php
editor/sqlite.php

index 4f29ee462da3278ea5ffc0a2d7802943e2ac3736..e309912c18e9fa6a3538ac49f613a3a31200a0d9 100644 (file)
@@ -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),
        ));
 }
index 610882a31b335082f5d3894fdaa344b207246139..bc724c297e58b3ba1a05e0970c54266bec1bf584 100644 (file)
@@ -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)),
        ));
index 5529b54a23ee07cbd37e90d9bf66b8c3dd1c8ddf..58dddf5722c4bdeea7947b3d5803e00c2dd2424a 100644 (file)
@@ -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
index 85687ab1f203d52df2e6a71becfa733509693235..5d4ddc39a591d3e55b272477a72010ef5a1f9e07 100644 (file)
@@ -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)),
        ));
index 17876d02f0d1529f4ebc9c0aa39cbb803969d624..41b2774f640c641ce86b5bfc832693f1da86eb22 100644 (file)
@@ -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));
                }