Merge pull request #11127 from Supermanu/del_proj_cat
FIX: Remove link between categories and project when deleting
This commit is contained in:
commit
92534cc101
@ -688,6 +688,18 @@ class Project extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// Remove linked categories.
|
||||
if (! $error) {
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX. "categorie_project";
|
||||
$sql.= " WHERE fk_project = ". $this->id;
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if (! $result) {
|
||||
$error++;
|
||||
$this->errors[] = $this->db->lasterror();
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch tasks
|
||||
$this->getLinesArray($user);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user