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

Split editFunctions

This commit is contained in:
Jakub Vrana
2025-03-28 14:53:53 +01:00
parent 46f6a96c95
commit 195341d075
11 changed files with 40 additions and 48 deletions

View File

@@ -672,7 +672,7 @@ class Adminer {
global $driver;
$return = ($field["null"] ? "NULL/" : "");
$update = isset($_GET["select"]) || where($_GET);
foreach ($driver->editFunctions as $key => $functions) {
foreach (array($driver->insertFunctions, $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"])) {
@@ -680,7 +680,7 @@ class Adminer {
}
}
}
if ($key && !preg_match('~set|blob|bytea|raw|file|bool~', $field["type"])) {
if ($key && $functions && !preg_match('~set|blob|bytea|raw|file|bool~', $field["type"])) {
$return .= "/SQL";
}
}