Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-01-04 03:56:27 +01:00
commit 2d53ed2085
4 changed files with 37 additions and 19 deletions

View File

@ -19,7 +19,8 @@ phpMyAdmin - ChangeLog
- bug #4209 Missing compression in one case
- bug #4208 Can't browse tables after sorting on columns with fieldnames that have a '-'
- bug #4184 Switch to wrong page after adding an index
- bug #3885 Additional fix for this bug
- bug #3885 Additional fix for this bug
- bug #4212 Table "disappears" if it has the same name as its tablegroup
4.1.3.0 (2013-12-31)
- bug #3938 PDFDefaultPageSize doc and easy configurability

View File

@ -76,11 +76,17 @@ if (true === $cfg['SkipLockedTables'] && ! PMA_DRIZZLE) {
$tblGroupSql = "";
$whereAdded = false;
if (PMA_isValid($_REQUEST['tbl_group'])) {
$tblGroupSql .= " WHERE "
$group = PMA_Util::escapeMysqlWildcards($_REQUEST['tbl_group']);
$groupWithSeperator = PMA_Util::escapeMysqlWildcards(
$_REQUEST['tbl_group']
. $GLOBALS['cfg']['NavigationTreeTableSeparator']
);
$tblGroupSql .= " WHERE ("
. PMA_Util::backquote('Tables_in_' . $db)
. " LIKE '"
. PMA_Util::escapeMysqlWildcards($_REQUEST['tbl_group'])
. "%'";
. " LIKE '^" . $groupWithSeperator . "%'"
. " OR "
. PMA_Util::backquote('Tables_in_' . $db)
. " LIKE '^" . $group . "$')";
$whereAdded = true;
}
if (PMA_isValid($_REQUEST['tbl_type'], array('table', 'view'))) {
@ -167,19 +173,28 @@ if (! isset($sot_ready)) {
}
$tbl_group = false;
$groupWithSeperator = false;
$tbl_type = null;
$limit_offset = 0;
$limit_count = false;
$groupTable = array();
if (! empty($_REQUEST['tbl_group']) || ! empty($_REQUEST['tbl_type'])) {
if (! empty($_REQUEST['tbl_group'])) {
// only tables for selected group
$tbl_group = $_REQUEST['tbl_group'];
}
if (! empty($_REQUEST['tbl_type'])) {
// only tables for selected type
$tbl_type = $_REQUEST['tbl_type'];
}
if (! empty($_REQUEST['tbl_group'])) {
// only tables for selected group
$tbl_group = $_REQUEST['tbl_group'];
// include the table with the exact name of the group if such exists
$groupTable = $GLOBALS['dbi']->getTablesFull(
$db, $tbl_group, false, null, $limit_offset,
$limit_count, $sort, $sort_order, $tbl_type
);
$groupWithSeperator = $tbl_group
. $GLOBALS['cfg']['NavigationTreeTableSeparator'];
}
} else {
// all tables in db
// - get the total number of tables
@ -200,9 +215,12 @@ if (! isset($sot_ready)) {
$limit_count = true;
}
}
$tables = $GLOBALS['dbi']->getTablesFull(
$db, $tbl_group, ($tbl_group != false), null, $limit_offset,
$limit_count, $sort, $sort_order, $tbl_type
$tables = array_merge(
$groupTable,
$GLOBALS['dbi']->getTablesFull(
$db, $groupWithSeperator, ($groupWithSeperator != false), null,
$limit_offset, $limit_count, $sort, $sort_order, $tbl_type
)
);
}

View File

@ -584,8 +584,7 @@ class PMA_NavigationTree
if ($node instanceof Node_Table_Container
|| $node instanceof Node_View_Container
) {
$tblGroup = '&tbl_group='
. urlencode($key . $node->separator);
$tblGroup = '&tbl_group=' . urlencode($key);
$groups[$key]->links = array(
'text' => $node->links['text'] . $tblGroup,
'icon' => $node->links['icon'] . $tblGroup

View File

@ -4,7 +4,7 @@
* @package PhpMyAdmin-Designer
*/
/**
* block attempts to directly run this script
* Block attempts to directly run this script
*/
if (getcwd() == dirname(__FILE__)) {
die('Attack stopped');
@ -22,7 +22,7 @@ $GLOBALS['PMD']['STYLE'] = 'default';
$cfgRelation = PMA_getRelationsParam();
/**
* retrieves table info and stores it in $GLOBALS['PMD']
* Retrieves table info and stores it in $GLOBALS['PMD']
*
* @return array with table info
*/
@ -74,7 +74,7 @@ function PMA_getTablesInfo()
}
/**
* retrieves table column info
* Retrieves table column info
*
* @return array table column nfo
*/
@ -107,7 +107,7 @@ function PMA_getColumnsInfo()
}
/**
* returns JavaScript code for initializing vars
* Returns JavaScript code for initializing vars
*
* @return string JavaScript code
*/
@ -186,7 +186,7 @@ function PMA_getPKOrUniqueKeys()
}
/**
* returns all indices
* Returns all indices
*
* @param bool $unique_only whether to include only unique ones
*