mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Fixes #4155 - database verification was failing when field name ended in a digit.
This commit is contained in:
parent
7081737f12
commit
1f502ce459
@ -952,9 +952,9 @@ class db_verify
|
||||
foreach($tmp as $line)
|
||||
{
|
||||
$line = trim($line);
|
||||
$newline[] = preg_replace("/^([^`A-Z\s][a-z_]*)/","`$1`", $line);
|
||||
$newline[] = preg_replace("/^([^`A-Z\s][a-z_]*[0-9]?)/","`$1`", $line);
|
||||
}
|
||||
|
||||
|
||||
$data = implode("\n",$newline);
|
||||
// --------------------
|
||||
|
||||
@ -966,6 +966,7 @@ class db_verify
|
||||
if(e_DEBUG)
|
||||
{
|
||||
// e107::getMessage()->addDebug("Regex: ".print_a($data,true));
|
||||
// echo $regex;
|
||||
// e107::getMessage()->addDebug("Regex: ".$regex);
|
||||
|
||||
}
|
||||
|
@ -48,6 +48,7 @@
|
||||
table_description text,
|
||||
table_summary text,
|
||||
table_media text,
|
||||
table_email2 tinyint(3) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (table_id)";
|
||||
|
||||
$expected = array (
|
||||
@ -179,6 +180,14 @@
|
||||
'null' => '',
|
||||
'default' => '',
|
||||
),
|
||||
'table_email2' =>
|
||||
array (
|
||||
'type' => 'TINYINT',
|
||||
'value' => '3',
|
||||
'attributes' => 'UNSIGNED',
|
||||
'null' => 'NOT NULL',
|
||||
'default' => 'DEFAULT \'0\'',
|
||||
),
|
||||
);
|
||||
|
||||
$actual = $this->dbv->getFields($data);
|
||||
@ -528,7 +537,8 @@
|
||||
PRIMARY KEY (rate_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
"
|
||||
",
|
||||
|
||||
);
|
||||
|
||||
$expected = array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user