From 6c3ba68ca1c30deee0e701d5e58bb40fcdc4e559 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 21 Apr 2010 15:40:58 +0000 Subject: [PATCH] If only_keys is true, expand it in so_sql_cf so the table_name can be prepended. Fixes last part of #2543, adding link when importing mail to infolog --- etemplate/inc/class.so_sql_cf.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etemplate/inc/class.so_sql_cf.inc.php b/etemplate/inc/class.so_sql_cf.inc.php index 04f44d6251..90d0137764 100644 --- a/etemplate/inc/class.so_sql_cf.inc.php +++ b/etemplate/inc/class.so_sql_cf.inc.php @@ -458,6 +458,10 @@ class so_sql_cf extends so_sql } } } + if($only_keys === true) { + // Expand to keys here, so table_name can be prepended below + $only_keys = array_values($this->db_key_cols); + } // replace ambiguous column with (an exact match of) table_name.column if(is_array($only_keys)) {