From de3640050743370f998dd5aae7a7eec82919b9ad Mon Sep 17 00:00:00 2001 From: Ankush Patil Date: Mon, 22 Jun 2020 21:34:15 +0530 Subject: [PATCH] globalised DEFAULT_GENERATED matching Signed-off-by: Ankush Patil --- libraries/classes/InsertEdit.php | 2 +- libraries/classes/Table.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/classes/InsertEdit.php b/libraries/classes/InsertEdit.php index 44f957e889..fed7d264fb 100644 --- a/libraries/classes/InsertEdit.php +++ b/libraries/classes/InsertEdit.php @@ -1670,7 +1670,7 @@ class InsertEdit $readOnly ); - if (preg_match('/(VIRTUAL|PERSISTENT|GENERATED)/', $column['Extra']) && $column['Extra'] !== 'DEFAULT_GENERATED') { + if (preg_match('/(VIRTUAL|PERSISTENT|GENERATED)/', $column['Extra']) && strpos($column['Extra'], 'DEFAULT_GENERATED') === false) { $html_output .= ''; } diff --git a/libraries/classes/Table.php b/libraries/classes/Table.php index 02fc4208c5..9c2f68d1e8 100644 --- a/libraries/classes/Table.php +++ b/libraries/classes/Table.php @@ -1810,7 +1810,7 @@ class Table if (( strpos($column['Extra'], 'GENERATED') === false && strpos($column['Extra'], 'VIRTUAL') === false - ) || $column['Extra'] === 'DEFAULT_GENERATED') { + ) || strpos($column['Extra'], 'DEFAULT_GENERATED') !== false) { $ret[] = $value; } }