Merge pull request #13493 from ptibogxiv/patch-320

FIX child categories only with good entity rights
This commit is contained in:
Laurent Destailleur 2020-04-05 02:40:43 +02:00 committed by GitHub
commit 683ddac0d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -917,7 +917,8 @@ class Categorie extends CommonObject
{
// phpcs:enable
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie";
$sql.= " WHERE fk_parent = ".$this->id;
$sql .= " WHERE fk_parent = ".$this->id;
$sql .= " AND entity IN (".getEntity('category').")";
$res = $this->db->query($sql);
if ($res)