From 1a083a80e80c6e6532cb424e24ebbbc6afbcfaa4 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 26 Jun 2007 11:53:09 +0000 Subject: [PATCH] bug #1733012 Unwanted table alias in delete button --- ChangeLog | 1 + libraries/common.lib.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0cac8ec4..b67f0e2d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ $HeadURL$ - bug #1722502 DROP TABLE in export VIEW - bug #1729027 Sorting results of VIEW browsing - bug #1727138 HTML not encoded (more than 1000 characters) +- bug #1733012 Unwanted table alias in delete button 2.10.2.0 (2007-06-15) diff --git a/libraries/common.lib.php b/libraries/common.lib.php index b6d09d552..1717ac6ee 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2196,7 +2196,7 @@ if (typeof(window.parent) != 'undefined' * @param array $row current row * * @access public - * @author Michal Cihar (michal@cihar.com) + * @author Michal Cihar (michal@cihar.com) and others... * @return string calculated condition */ function PMA_getUniqueCondition($handle, $fields_cnt, $fields_meta, $row) @@ -2210,7 +2210,7 @@ if (typeof(window.parent) != 'undefined' $field_flags = PMA_DBI_field_flags($handle, $i); $meta = $fields_meta[$i]; - // do not use an alias in a condition + // do not use a column alias in a condition if (! isset($meta->orgname) || ! strlen($meta->orgname)) { $meta->orgname = $meta->name; @@ -2228,6 +2228,10 @@ if (typeof(window.parent) != 'undefined' } } + // do not use a table alias in a condition + if ($meta->table != $meta->orgtable) { + $meta->table = $meta->orgtable; + } // to fix the bug where float fields (primary or not) // can't be matched because of the imprecision of