cleanup
This commit is contained in:
@@ -537,10 +537,7 @@ function PMA_DBI_num_fields($result)
|
|||||||
*/
|
*/
|
||||||
function PMA_DBI_field_len($result, $i)
|
function PMA_DBI_field_len($result, $i)
|
||||||
{
|
{
|
||||||
$info = mysqli_fetch_field_direct($result, $i);
|
return mysqli_fetch_field_direct($result, $i)->length;
|
||||||
// stdClass::$length will be integrated in
|
|
||||||
// mysqli-ext when mysql4.1 has been released.
|
|
||||||
return @$info->length;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -553,8 +550,7 @@ function PMA_DBI_field_len($result, $i)
|
|||||||
*/
|
*/
|
||||||
function PMA_DBI_field_name($result, $i)
|
function PMA_DBI_field_name($result, $i)
|
||||||
{
|
{
|
||||||
$info = mysqli_fetch_field_direct($result, $i);
|
return mysqli_fetch_field_direct($result, $i)->name;
|
||||||
return $info->name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1890,25 +1890,14 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
|||||||
// of the foreign key REFERENCES
|
// of the foreign key REFERENCES
|
||||||
if ($brackets_level > 1) {
|
if ($brackets_level > 1) {
|
||||||
$foreign[$foreign_key_number]['ref_index_list'][] = $identifier;
|
$foreign[$foreign_key_number]['ref_index_list'][] = $identifier;
|
||||||
} else {
|
} elseif ($arr[$i+1]['type'] == 'punct_qualifier') {
|
||||||
// for MySQL 4.0.18, identifier is
|
// identifier is `db`.`table`
|
||||||
// `table` or `db`.`table`
|
|
||||||
// the first pass will pick the db name
|
// the first pass will pick the db name
|
||||||
// the next pass will execute the else and pick the
|
// the next pass will pick the table name
|
||||||
// db name in $db_table[0]
|
|
||||||
if ($arr[$i+1]['type'] == 'punct_qualifier') {
|
|
||||||
$foreign[$foreign_key_number]['ref_db_name'] = $identifier;
|
$foreign[$foreign_key_number]['ref_db_name'] = $identifier;
|
||||||
} else {
|
} else {
|
||||||
// for MySQL 4.0.16, identifier is
|
// identifier is `table`
|
||||||
// `table` or `db.table`
|
$foreign[$foreign_key_number]['ref_table_name'] = $identifier;
|
||||||
$db_table = explode('.', $identifier);
|
|
||||||
if (isset($db_table[1])) {
|
|
||||||
$foreign[$foreign_key_number]['ref_db_name'] = $db_table[0];
|
|
||||||
$foreign[$foreign_key_number]['ref_table_name'] = $db_table[1];
|
|
||||||
} else {
|
|
||||||
$foreign[$foreign_key_number]['ref_table_name'] = $db_table[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user