mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 09:34:10 +02:00
Fixes foreign key pattern in MySQL
Foreign keys are not displaying in MySQL when ANSI_QUOTES is enabled because the preg_match_all() is looking specifically for backticks. This fix allows for double quotes as well, so foreign keys are recognized even when ANSI_QUOTES is enabled.
This commit is contained in:
committed by
Jakub Vrana
parent
bb3d2957e1
commit
e959e46fa5
@@ -579,7 +579,7 @@ if (!defined("DRIVER")) {
|
||||
*/
|
||||
function foreign_keys($table) {
|
||||
global $connection, $on_actions;
|
||||
static $pattern = '`(?:[^`]|``)+`';
|
||||
static $pattern = '(?:`(?:[^`]|``)+`)|(?:"(?:[^"]|"")+")';
|
||||
$return = array();
|
||||
$create_table = $connection->result("SHOW CREATE TABLE " . table($table), 1);
|
||||
if ($create_table) {
|
||||
|
Reference in New Issue
Block a user