Merge branch 'QA_4_7'

This commit is contained in:
Michal Čihař 2017-02-02 15:13:13 +01:00
commit 018fa75156
3 changed files with 10 additions and 13 deletions

View File

@ -319,13 +319,17 @@ class DatabaseInterface
*/
public function getTables($database, $link = null)
{
return $this->fetchResult(
$tables = $this->fetchResult(
'SHOW TABLES FROM ' . Util::backquote($database) . ';',
null,
0,
$link,
self::QUERY_STORE
);
if ($GLOBALS['cfg']['NaturalOrder']) {
uksort($tables, 'strnatcasecmp');
}
return $tables;
}
/**

View File

@ -65,9 +65,9 @@ if ($foreign_db) {
$tables[] = $row[0];
}
}
}
if ($GLOBALS['cfg']['NaturalOrder']) {
uksort($tables, 'strnatcasecmp');
if ($GLOBALS['cfg']['NaturalOrder']) {
uksort($tables, 'strnatcasecmp');
}
}
?>
<tr>

View File

@ -23,14 +23,7 @@ if ($foreign_db) {
if (isset($existrel[$myfield])) {
$foreign_table = $existrel[$myfield]['foreign_table'];
}
$tables_rs = $GLOBALS['dbi']->query(
'SHOW TABLES FROM ' . PMA\libraries\Util::backquote($foreign_db),
null,
PMA\libraries\DatabaseInterface::QUERY_STORE
);
while ($row = $GLOBALS['dbi']->fetchRow($tables_rs)) {
$tables[] = $row[0];
}
$tables = $GLOBALS['dbi']->getTables();
}
// column dropdown
@ -76,4 +69,4 @@ if ($foreign_db && $foreign_table) {
)
); ?>
</td>
</tr>
</tr>