Skip to content
Snippets Groups Projects
Commit a4797a0e authored by Cédric Gross's avatar Cédric Gross Committed by Laurent Destailleur
Browse files

FIX : [ bug #1317 ] Removing a category does not remove all child categories

parent ab6a6705
No related branches found
No related tags found
No related merge requests found
......@@ -290,6 +290,20 @@ class Categorie
$this->db->begin();
/* FIX #1317 : Check for child cat and move up 1 level*/
if (! $error)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."categorie";
$sql.= " SET fk_parent = ".$this->fk_parent;
$sql.= " WHERE fk_parent = ".$this->id;
if (!$this->db->query($sql))
{
$this->error=$this->db->lasterror();
dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR);
$error++;
}
}
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_societe";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment