Fix: Fails to delete member
This commit is contained in:
parent
f47d6c71ed
commit
49c7a1f2b4
@ -185,12 +185,12 @@ class Adherent extends CommonObject
|
|||||||
function makeSubstitution($text)
|
function makeSubstitution($text)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$birthday = dol_print_date($this->naiss,'day');
|
$birthday = dol_print_date($this->naiss,'day');
|
||||||
|
|
||||||
$msgishtml = 0;
|
$msgishtml = 0;
|
||||||
if (dol_textishtml($text,1)) $msgishtml = 1;
|
if (dol_textishtml($text,1)) $msgishtml = 1;
|
||||||
|
|
||||||
$infos='';
|
$infos='';
|
||||||
if ($this->civilite_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n";
|
if ($this->civilite_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n";
|
||||||
$infos.= $langs->transnoentities("id").": ".$this->id."\n";
|
$infos.= $langs->transnoentities("id").": ".$this->id."\n";
|
||||||
@ -207,7 +207,7 @@ class Adherent extends CommonObject
|
|||||||
$infos.= $langs->transnoentities("Birthday").": ".$birthday."\n";
|
$infos.= $langs->transnoentities("Birthday").": ".$birthday."\n";
|
||||||
$infos.= $langs->transnoentities("Photo").": ".$this->photo."\n";
|
$infos.= $langs->transnoentities("Photo").": ".$this->photo."\n";
|
||||||
$infos.= $langs->transnoentities("Public").": ".yn($this->public);
|
$infos.= $langs->transnoentities("Public").": ".yn($this->public);
|
||||||
|
|
||||||
// Substitutions
|
// Substitutions
|
||||||
$substitutionarray=array(
|
$substitutionarray=array(
|
||||||
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
|
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
|
||||||
@ -227,9 +227,9 @@ class Adherent extends CommonObject
|
|||||||
'%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login,
|
'%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login,
|
||||||
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass
|
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass
|
||||||
);
|
);
|
||||||
|
|
||||||
complete_substitutions_array($substitutionarray, $langs);
|
complete_substitutions_array($substitutionarray, $langs);
|
||||||
|
|
||||||
return make_substitutions($text,$substitutionarray);
|
return make_substitutions($text,$substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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);
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user