Fix: Missing cleaning orphelins for contact categories.
This commit is contained in:
parent
53a1e7d09a
commit
503924fbbc
@ -46,7 +46,7 @@ class Categorie
|
||||
var $label;
|
||||
var $description;
|
||||
var $socid;
|
||||
var $type; // 0=Product, 1=Supplier, 2=Customer/Prospect, 3=Member
|
||||
var $type; // 0=Product, 1=Supplier, 2=Customer/Prospect, 3=Member, 4=Contact
|
||||
var $import_key;
|
||||
|
||||
var $cats=array(); // Tableau en memoire des categories
|
||||
@ -296,7 +296,7 @@ class Categorie
|
||||
if (! $error)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."categorie";
|
||||
$sql.= " SET fk_parent = ".$this->fk_parent;
|
||||
$sql.= " SET fk_parent = ".$this->fk_parent;
|
||||
$sql.= " WHERE fk_parent = ".$this->id;
|
||||
|
||||
if (!$this->db->query($sql))
|
||||
|
||||
@ -117,7 +117,6 @@ create table llx_links
|
||||
objectid INTEGER NOT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
|
||||
ALTER TABLE llx_categorie_contact ADD PRIMARY KEY pk_categorie_contact (fk_categorie, fk_socpeople);
|
||||
ALTER TABLE llx_categorie_contact ADD INDEX idx_categorie_contact_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_contact ADD INDEX idx_categorie_contact_fk_socpeople (fk_socpeople);
|
||||
|
||||
@ -65,6 +65,7 @@ drop table tmp_categorie;
|
||||
delete from llx_categorie_product where fk_categorie not in (select rowid from llx_categorie where type = 0);
|
||||
delete from llx_categorie_societe where fk_categorie not in (select rowid from llx_categorie where type in (1, 2));
|
||||
delete from llx_categorie_member where fk_categorie not in (select rowid from llx_categorie where type = 3);
|
||||
delete from llx_categorie_contact where fk_categorie not in (select rowid from llx_categorie where type = 4);
|
||||
|
||||
|
||||
-- Fix: delete orphelin deliveries. Note: deliveries are linked to shipment by llx_element_element only. No other links.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user