add only slashes where required
This commit is contained in:
@@ -219,9 +219,9 @@ function PMA_DBI_get_tables_full($database, $table = false,
|
||||
{
|
||||
// prepare and check parameters
|
||||
if (! is_array($database)) {
|
||||
$databases = array(addslashes($database));
|
||||
$databases = array($database);
|
||||
} else {
|
||||
$databases = array_map('addslashes', $database);
|
||||
$databases = $database;
|
||||
}
|
||||
|
||||
$tables = array();
|
||||
@@ -249,6 +249,8 @@ function PMA_DBI_get_tables_full($database, $table = false,
|
||||
// added BINARY in the WHERE clause to force a case sensitive
|
||||
// comparison (if we are looking for the db Aa we don't want
|
||||
// to find the db aa)
|
||||
$this_databases = array_map('PMA_sqlAddslashes', $databases);
|
||||
|
||||
$sql = '
|
||||
SELECT *,
|
||||
`TABLE_SCHEMA` AS `Db`,
|
||||
@@ -272,7 +274,7 @@ function PMA_DBI_get_tables_full($database, $table = false,
|
||||
`CREATE_OPTIONS` AS `Create_options`,
|
||||
`TABLE_COMMENT` AS `Comment`
|
||||
FROM `information_schema`.`TABLES`
|
||||
WHERE ' . (PMA_IS_WINDOWS ? '' : 'BINARY') . ' `TABLE_SCHEMA` IN (\'' . implode("', '", $databases) . '\')
|
||||
WHERE ' . (PMA_IS_WINDOWS ? '' : 'BINARY') . ' `TABLE_SCHEMA` IN (\'' . implode("', '", $this_databases) . '\')
|
||||
' . $sql_where_table;
|
||||
|
||||
$tables = PMA_DBI_fetch_result($sql, array('TABLE_SCHEMA', 'TABLE_NAME'),
|
||||
@@ -365,7 +367,7 @@ function PMA_DBI_get_tables_full($database, $table = false,
|
||||
// with SHOW DATABASES or information_schema.SCHEMATA: `Test`
|
||||
// but information_schema.TABLES gives `test`
|
||||
// bug #1436171
|
||||
// sf.net/tracker/?func=detail&aid=1436171&group_id=23067&atid=377408
|
||||
// http://sf.net/support/tracker.php?aid=1436171
|
||||
return $tables[strtolower($database)];
|
||||
} else {
|
||||
return $tables;
|
||||
@@ -1175,7 +1177,7 @@ function PMA_DBI_getCompatibilities()
|
||||
function PMA_DBI_get_warnings($link = null)
|
||||
{
|
||||
if (PMA_MYSQL_INT_VERSION < 40100) {
|
||||
return array();
|
||||
return array();
|
||||
}
|
||||
|
||||
if (empty($link)) {
|
||||
|
Reference in New Issue
Block a user