Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Jul 15, 2023
1 parent e18db23 commit aca014c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions htdocs/categories/class/categorie.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1493,9 +1493,7 @@ public function containing($id, $type, $mode = 'object')
$sql = "SELECT ct.fk_category, c.label, c.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."element_category as ct, ".MAIN_DB_PREFIX."categorie as c";
$sql .= " WHERE ct.fk_category = c.rowid AND ct.fk_element = ".(int) $id;
// This seems useless because the table already contains id of category of 1 unique type. So commented.
// So now it works also with external added categories.
//$sql .= " AND c.type = ".((int) $this->MAP_ID[$type]);
$sql .= " AND c.type = ".((int) $this->MAP_ID[$type]);
$sql .= " AND c.entity IN (".getEntity('category').")";

$res = $this->db->query($sql);
Expand Down

0 comments on commit aca014c

Please sign in to comment.