From ee06f36f4c82f8b51624ceed78ef79a20dd7f61b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 9 Nov 2018 11:36:20 +0100 Subject: [PATCH] FIX missing field "visible" --- htdocs/categories/class/categorie.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 70b2108dd4c..3de9bdfab0a 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1043,7 +1043,7 @@ class Categorie extends CommonObject $current_lang = $langs->getDefaultLang(); // Init $this->cats array - $sql = "SELECT DISTINCT c.rowid, c.label, c.description, c.color, c.fk_parent"; // Distinct reduce pb with old tables with duplicates + $sql = "SELECT DISTINCT c.rowid, c.label, c.description, c.color, c.fk_parent, c.visible"; // Distinct reduce pb with old tables with duplicates if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= ", t.label as label_trans, t.description as description_trans"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie as c"; if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$current_lang."'"; @@ -1063,6 +1063,7 @@ class Categorie extends CommonObject $this->cats[$obj->rowid]['label'] = ! empty($obj->label_trans) ? $obj->label_trans : $obj->label; $this->cats[$obj->rowid]['description'] = ! empty($obj->description_trans) ? $obj->description_trans : $obj->description; $this->cats[$obj->rowid]['color'] = $obj->color; + $this->cats[$obj->rowid]['visible'] = $obj->visible; $i++; } }