Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Foellmann <foellmann@foe-services.de>2014-09-22 14:13:19 +0400
committerChristian Foellmann <foellmann@foe-services.de>2014-09-22 14:13:19 +0400
commitf47a5e0130fef6a3858fe9566f0726b23c21330f (patch)
tree9b339aeae85613b2a4d968fbea9ebe922cf75557 /libraries/Table.class.php
parent3ec415b4402a4b8e3521f9604efa445a91433bd0 (diff)
UPDATE 4.2.9
Diffstat (limited to 'libraries/Table.class.php')
-rw-r--r--libraries/Table.class.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/libraries/Table.class.php b/libraries/Table.class.php
index 676127c913..7f8d367dc1 100644
--- a/libraries/Table.class.php
+++ b/libraries/Table.class.php
@@ -1439,8 +1439,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;