]> git.joonet.de Git - adminer.git/commitdiff
AdminerConfig: Move link (fix #995)
authorJakub Vrana <jakub@vrana.cz>
Mon, 7 Apr 2025 18:54:51 +0000 (20:54 +0200)
committerJakub Vrana <jakub@vrana.cz>
Mon, 7 Apr 2025 18:55:01 +0000 (20:55 +0200)
adminer/include/adminer.inc.php
adminer/include/connect.inc.php
editor/db.inc.php
editor/include/adminer.inc.php
plugins/config.php

index 2fa6990582f717883174e636865722690f7c3eb4..e2e6453da881ec1624b1f53dc57003782a3f3aae 100644 (file)
@@ -60,6 +60,10 @@ class Adminer {
                return get_databases($flush);
        }
 
+       /** Print links after list of plugins */
+       function pluginsLinks(): void {
+       }
+
        /** Operators used in select
        * @return list<string> operators
        */
index 58dac265b31e9f6e3b651501f5de1f4c8d6fbac2..3009b7c5985ff8d3c804b349b7dffb6020ae312e 100644 (file)
@@ -108,6 +108,7 @@ if (
                                ;
                        }
                        echo "</ul>\n";
+                       adminer()->pluginsLinks();
                        echo "</div>\n";
                }
        }
index 094c362e591ff55ab77ab68e0f0320b80ea3df5b..30153885297c68cf38f3c6d55b3acb051aae95a6 100644 (file)
@@ -32,4 +32,5 @@ if (adminer()->homepage()) {
        echo "</div>\n";
        echo "</form>\n";
        echo script("tableCheck();");
+       adminer()->pluginsLinks();
 }
index 545baa2dbaaad3b03f958119fe303daabeaebf44..0f2b0990aa06ba4008a9ffe40eb359121491cad3 100644 (file)
@@ -52,6 +52,9 @@ class Adminer {
                return get_databases($flush);
        }
 
+       function pluginsLinks(): void {
+       }
+
        function queryTimeout() {
                return 5;
        }
index 0853a42cdbfb2e09b314f58d7f9ccfc012303cb4..5d4c7cd2a5d8fb32bab9a682057e6680588da0ef 100644 (file)
@@ -51,20 +51,9 @@ class AdminerConfig extends Adminer\Plugin {
                }
        }
 
-       function navigation() {
-               if (Adminer\connection()) { // don't display on login page
-                       $link = substr(preg_replace('~\b(db|ns)=[^&]*&~', '', Adminer\ME), 0, -1);
-                       ?>
-<style>
-#configlink { position: absolute; top: -2.6em; left: 17.8em; }
-#configlink a { font-size: 150%; }
-@media all and (max-width: 800px) {
-       #configlink { top: 5em; left: auto; right: 20px; }
-}
-</style>
-<?php
-                       echo "<div id='configlink'><a href='" . Adminer\h($link) . "&config=' title='" . $this->lang('Configuration') . "'>⚙</a></div>\n";
-               }
+       function pluginsLinks() {
+               $link = preg_replace('~\b(db|ns)=[^&]*&~', '', Adminer\ME);
+               echo "<p><a href='" . Adminer\h($link) . "config='>" . $this->lang('Configuration') . "</a>\n";
        }
 
        function screenshot() {