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

Move $enum_length to Driver

This commit is contained in:
Jakub Vrana
2025-03-06 14:51:24 +01:00
parent f711135574
commit c6f825a786
5 changed files with 7 additions and 8 deletions

View File

@@ -256,8 +256,8 @@ function get_partitions_info($table) {
* @return string
*/
function process_length($length) {
global $enum_length;
return (preg_match("~^\\s*\\(?\\s*$enum_length(?:\\s*,\\s*$enum_length)*+\\s*\\)?\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches)
global $driver;
return (preg_match("~^\\s*\\(?\\s*$driver->enumLength(?:\\s*,\\s*$enum_length)*+\\s*\\)?\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches)
? "(" . implode(",", $matches[0]) . ")"
: preg_replace('~^[0-9].*~', '(\0)', preg_replace('~[^-0-9,+()[\]]~', '', $length))
);