From 767069a54c0cabff4662d7abb363cab38085f521 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 17 Oct 2013 14:09:04 +0000 Subject: [PATCH] make sure to load all cfs, if "customfield" in in selected columns --- etemplate/inc/class.so_sql_cf.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.so_sql_cf.inc.php b/etemplate/inc/class.so_sql_cf.inc.php index 94a8fa902b..757e44ad78 100644 --- a/etemplate/inc/class.so_sql_cf.inc.php +++ b/etemplate/inc/class.so_sql_cf.inc.php @@ -377,9 +377,12 @@ class so_sql_cf extends so_sql $id2keys[$row[$this->autoinc_id]] = $key; } // check if only certain cf's to show - foreach($selectcols as $col) + if (!in_array('customfields', $selectcols)) { - if ($this->is_cf($col)) $fields[] = $this->get_cf_name($col); + foreach($selectcols as $col) + { + if ($this->is_cf($col)) $fields[] = $this->get_cf_name($col); + } } if (($cfs = $this->read_customfields(array_keys($id2keys),$fields))) {