From 9f01aa51a3a6498475359c19e60187b9791a1945 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Tue, 3 Sep 2013 15:19:03 +0200 Subject: [PATCH] fix regression --- 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 09d8f373543..b4fa020e2b3 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2006-2012 Regis Houssin * Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin + * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2013 Philippe Grand * * This program is free software; you can redistribute it and/or modify @@ -622,7 +623,7 @@ class Categorie $sql = "SELECT fk_parent as id_parent, rowid as id_son"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie"; $sql.= " WHERE fk_parent != 0"; - $sql.= " AND entity = ".$conf->entity; + $sql.= " AND entity IN (".getEntity('category',1).")"; dol_syslog(get_class($this)."::load_motherof sql=".$sql); $resql = $this->db->query($sql);