avoid confusion with older $str variables

This commit is contained in:
Marc Delisle
2010-05-05 15:34:53 -04:00
parent 17c9fb4d28
commit 37f0d02a1e
2 changed files with 16 additions and 16 deletions

View File

@@ -640,13 +640,13 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $a
$sql_constraints .= $crlf;
}
if (strpos($sql_lines[$j], 'CONSTRAINT') === FALSE) {
$str_tmp = preg_replace('/(FOREIGN[\s]+KEY)/', 'ADD \1', $sql_lines[$j]);
$sql_constraints_query .= $str_tmp;
$sql_constraints .= $str_tmp;
$tmp_str = preg_replace('/(FOREIGN[\s]+KEY)/', 'ADD \1', $sql_lines[$j]);
$sql_constraints_query .= $tmp_str;
$sql_constraints .= $tmp_str;
} else {
$str_tmp = preg_replace('/(CONSTRAINT)/', 'ADD \1', $sql_lines[$j]);
$sql_constraints_query .= $str_tmp;
$sql_constraints .= $str_tmp;
$tmp_str = preg_replace('/(CONSTRAINT)/', 'ADD \1', $sql_lines[$j]);
$sql_constraints_query .= $tmp_str;
$sql_constraints .= $tmp_str;
preg_match('/(CONSTRAINT)([\s])([\S]*)([\s])/', $sql_lines[$j], $matches);
if (! $first) {
$sql_drop_foreign_keys .= ', ';