1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-14 18:44:02 +02:00

Move edit functions to Driver

This commit is contained in:
Jakub Vrana
2025-03-06 13:15:38 +01:00
parent 37a75f3759
commit 2f0cd4185b
14 changed files with 65 additions and 67 deletions

View File

@@ -684,10 +684,10 @@ class Adminer {
* @return array
*/
function editFunctions($field) {
global $edit_functions;
global $driver;
$return = ($field["null"] ? "NULL/" : "");
$update = isset($_GET["select"]) || where($_GET);
foreach ($edit_functions as $key => $functions) {
foreach ($driver->editFunctions as $key => $functions) {
if (!$key || (!isset($_GET["call"]) && $update)) { // relative functions
foreach ($functions as $pattern => $val) {
if (!$pattern || preg_match("~$pattern~", $field["type"])) {