Fix: Fails to delete member

This commit is contained in:
Laurent Destailleur 2012-05-09 15:21:43 +02:00
parent f47d6c71ed
commit 49c7a1f2b4
2 changed files with 11 additions and 7 deletions

View File

@ -696,6 +696,10 @@ class Adherent extends CommonObject
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_member WHERE fk_member = ".$rowid;
dol_syslog(get_class($this)."::delete sql=".$sql);
$resql=$this->db->query($sql);
$sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE fk_adherent = ".$rowid; $sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE fk_adherent = ".$rowid;
dol_syslog(get_class($this)."::delete sql=".$sql); dol_syslog(get_class($this)."::delete sql=".$sql);
$resql=$this->db->query($sql); $resql=$this->db->query($sql);

View File

@ -1506,7 +1506,7 @@ if ($rowid && $action != 'edit')
} }
// Action SPIP // Action SPIP
if ($conf->global->ADHERENT_USE_SPIP) if ($conf->mailmanspip->enabled && $conf->global->ADHERENT_USE_SPIP)
{ {
$isinspip=$object->is_in_spip(); $isinspip=$object->is_in_spip();
if ($isinspip == 1) if ($isinspip == 1)