Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-08-25 18:43:48 +02:00
commit ff88073755
2 changed files with 15 additions and 2 deletions

View File

@ -44,6 +44,7 @@ phpMyAdmin - ChangeLog
- bug #4520 sql.js: cannot read property
- bug #4521 Initially allowed chart types do not match selected data
- bug #4518 Export to SQL: CREATE TABLE option AUTO_INCREMENT ignored
- bug #4522 Duplicate column names while assigning index
4.2.7.1 (2014-08-17)
- bug #4501 [security] XSS in table browse page

View File

@ -1418,8 +1418,20 @@ class PMA_Table
if (count($index) > 1) {
continue;
}
$return[] = ($fullName ? $this->getFullName($backquoted) . '.' : '')
. ($backquoted ? PMA_Util::backquote($index[0]) : $index[0]);
if ($fullName) {
$possible_column = $this->getFullName($backquoted) . '.';
} else {
$possible_column = '';
}
if ($backquoted) {
$possible_column .= PMA_Util::backquote($index[0]);
} else {
$possible_column .= $index[0];
}
// a column might have a primary and an unique index on it
if (! in_array($possible_column, $return)) {
$return[] = $possible_column;
}
}
return $return;