avoid confusion with older $str variables
This commit is contained in:
@@ -640,13 +640,13 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $a
|
|||||||
$sql_constraints .= $crlf;
|
$sql_constraints .= $crlf;
|
||||||
}
|
}
|
||||||
if (strpos($sql_lines[$j], 'CONSTRAINT') === FALSE) {
|
if (strpos($sql_lines[$j], 'CONSTRAINT') === FALSE) {
|
||||||
$str_tmp = preg_replace('/(FOREIGN[\s]+KEY)/', 'ADD \1', $sql_lines[$j]);
|
$tmp_str = preg_replace('/(FOREIGN[\s]+KEY)/', 'ADD \1', $sql_lines[$j]);
|
||||||
$sql_constraints_query .= $str_tmp;
|
$sql_constraints_query .= $tmp_str;
|
||||||
$sql_constraints .= $str_tmp;
|
$sql_constraints .= $tmp_str;
|
||||||
} else {
|
} else {
|
||||||
$str_tmp = preg_replace('/(CONSTRAINT)/', 'ADD \1', $sql_lines[$j]);
|
$tmp_str = preg_replace('/(CONSTRAINT)/', 'ADD \1', $sql_lines[$j]);
|
||||||
$sql_constraints_query .= $str_tmp;
|
$sql_constraints_query .= $tmp_str;
|
||||||
$sql_constraints .= $str_tmp;
|
$sql_constraints .= $tmp_str;
|
||||||
preg_match('/(CONSTRAINT)([\s])([\S]*)([\s])/', $sql_lines[$j], $matches);
|
preg_match('/(CONSTRAINT)([\s])([\S]*)([\s])/', $sql_lines[$j], $matches);
|
||||||
if (! $first) {
|
if (! $first) {
|
||||||
$sql_drop_foreign_keys .= ', ';
|
$sql_drop_foreign_keys .= ', ';
|
||||||
|
@@ -227,17 +227,17 @@ function PMA_sqlQueryFormInsert($query = '', $is_querywindow = false, $delimiter
|
|||||||
// prepare for db related
|
// prepare for db related
|
||||||
$db = $GLOBALS['db'];
|
$db = $GLOBALS['db'];
|
||||||
// if you want navigation:
|
// if you want navigation:
|
||||||
$strDBLink = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase']
|
$tmp_db_link = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase']
|
||||||
. '?' . PMA_generate_common_url($db) . '"';
|
. '?' . PMA_generate_common_url($db) . '"';
|
||||||
if ($is_querywindow) {
|
if ($is_querywindow) {
|
||||||
$strDBLink .= ' target="_self"'
|
$tmp_db_link .= ' target="_self"'
|
||||||
. ' onclick="this.target=window.opener.frame_content.name"';
|
. ' onclick="this.target=window.opener.frame_content.name"';
|
||||||
}
|
}
|
||||||
$strDBLink .= '>'
|
$tmp_db_link .= '>'
|
||||||
. htmlspecialchars($db) . '</a>';
|
. htmlspecialchars($db) . '</a>';
|
||||||
// else use
|
// else use
|
||||||
// $strDBLink = htmlspecialchars($db);
|
// $tmp_db_link = htmlspecialchars($db);
|
||||||
$legend = sprintf(__('Run SQL query/queries on database %s'), $strDBLink);
|
$legend = sprintf(__('Run SQL query/queries on database %s'), $tmp_db_link);
|
||||||
if (empty($query)) {
|
if (empty($query)) {
|
||||||
$query = str_replace('%d',
|
$query = str_replace('%d',
|
||||||
PMA_backquote($db), $GLOBALS['cfg']['DefaultQueryDatabase']);
|
PMA_backquote($db), $GLOBALS['cfg']['DefaultQueryDatabase']);
|
||||||
@@ -252,17 +252,17 @@ function PMA_sqlQueryFormInsert($query = '', $is_querywindow = false, $delimiter
|
|||||||
'SHOW FULL COLUMNS FROM ' . PMA_backquote($db)
|
'SHOW FULL COLUMNS FROM ' . PMA_backquote($db)
|
||||||
. '.' . PMA_backquote($GLOBALS['table']));
|
. '.' . PMA_backquote($GLOBALS['table']));
|
||||||
|
|
||||||
$strDBLink = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase']
|
$tmp_db_link = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase']
|
||||||
. '?' . PMA_generate_common_url($db) . '"';
|
. '?' . PMA_generate_common_url($db) . '"';
|
||||||
if ($is_querywindow) {
|
if ($is_querywindow) {
|
||||||
$strDBLink .= ' target="_self"'
|
$tmp_db_link .= ' target="_self"'
|
||||||
. ' onclick="this.target=window.opener.frame_content.name"';
|
. ' onclick="this.target=window.opener.frame_content.name"';
|
||||||
}
|
}
|
||||||
$strDBLink .= '>'
|
$tmp_db_link .= '>'
|
||||||
. htmlspecialchars($db) . '</a>';
|
. htmlspecialchars($db) . '</a>';
|
||||||
// else use
|
// else use
|
||||||
// $strDBLink = htmlspecialchars($db);
|
// $tmp_db_link = htmlspecialchars($db);
|
||||||
$legend = sprintf(__('Run SQL query/queries on database %s'), $strDBLink);
|
$legend = sprintf(__('Run SQL query/queries on database %s'), $tmp_db_link);
|
||||||
if (empty($query) && count($fields_list)) {
|
if (empty($query) && count($fields_list)) {
|
||||||
$field_names = array();
|
$field_names = array();
|
||||||
foreach ($fields_list as $field) {
|
foreach ($fields_list as $field) {
|
||||||
|
Reference in New Issue
Block a user