From: Jakub Vrana Date: Wed, 5 Mar 2025 12:14:21 +0000 (+0100) Subject: Namespaces in compile X-Git-Tag: v5.0.0~62 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=2a8b4009b14b5058e2161d1fe4a41a513fbc64b2;p=adminer.git Namespaces in compile --- diff --git a/compile.php b/compile.php index 6e2a31d5..0a4e6fa9 100755 --- a/compile.php +++ b/compile.php @@ -1,7 +1,5 @@ #!/usr/bin/env php array("show_variables"), ); foreach ($requires as $support => $fns) { - if (!support($support)) { + if (!Adminer\support($support)) { foreach ($fns as $fn) { unset($functions[$fn]); } @@ -416,14 +415,14 @@ if ($driver) { $_GET[$driver] = true; // to load the driver include_once __DIR__ . $driver_path; foreach ($features as $key => $feature) { - if (!support($feature)) { + if (!Adminer\support($feature)) { if (!is_int($key)) { $feature = $key; } $file = str_replace("} elseif (isset(\$_GET[\"$feature\"])) {\n\tinclude \"./$feature.inc.php\";\n", "", $file); } } - if (!support("routine")) { + if (!Adminer\support("routine")) { $file = str_replace("if (isset(\$_GET[\"callf\"])) {\n\t\$_GET[\"call\"] = \$_GET[\"callf\"];\n}\nif (isset(\$_GET[\"function\"])) {\n\t\$_GET[\"procedure\"] = \$_GET[\"function\"];\n}\n", "", $file); } } @@ -438,7 +437,7 @@ if ($driver) { $file = preg_replace_callback('~\b(include|require) "([^"]*)";~', 'put_file', $file); // bootstrap.inc.php if ($driver) { foreach ($features as $feature) { - if (!support($feature)) { + if (!Adminer\support($feature)) { $file = preg_replace("((\t*)" . preg_quote('if (support("' . $feature . '")') . ".*\n\\1\\})sU", '', $file); } }