mirror of
https://github.com/vrana/adminer.git
synced 2025-08-07 23:27:17 +02:00
MySQL: Remove negation from support()
This commit is contained in:
@@ -1047,10 +1047,17 @@ if (!defined('Adminer\DRIVER')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Check whether a feature is supported
|
/** Check whether a feature is supported
|
||||||
* @param literal-string $feature "check|comment|copy|database|descidx|drop_col|dump|event|indexes|kill|materializedview|privileges|procedure|processlist|routine|scheme|sequence|status|table|trigger|type|variables|view|view_trigger"
|
* @param literal-string $feature "check|comment|columns|copy|database|descidx|drop_col|dump|event|indexes|kill|materializedview|privileges|procedure|processlist|routine|scheme|sequence|sql|status|table|trigger|type|variables|view|view_trigger"
|
||||||
*/
|
*/
|
||||||
function support(string $feature): bool {
|
function support(string $feature): bool {
|
||||||
return !preg_match("~scheme|sequence|type|view_trigger|materializedview" . (min_version(8) ? "" : "|descidx" . (min_version(5.1) ? "" : "|event")) . (min_version('8.0.16', '10.2.1') ? "" : "|check") . "~", $feature);
|
return preg_match(
|
||||||
|
'~^(comment|columns|copy|database|drop_col|dump|indexes|kill|privileges|procedure|processlist|routine|sql|status|table|trigger|variables|view'
|
||||||
|
. (min_version(5.1) ? '|event' : '')
|
||||||
|
. (min_version(8) ? '|descidx' : '')
|
||||||
|
. (min_version('8.0.16', '10.2.1') ? '|check' : '')
|
||||||
|
. ')$~',
|
||||||
|
$feature
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Kill a process
|
/** Kill a process
|
||||||
|
Reference in New Issue
Block a user