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:
@@ -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))
|
||||
);
|
||||
|
Reference in New Issue
Block a user