Fix: bug detected with phpunit

This commit is contained in:
Laurent Destailleur 2013-09-09 02:37:11 +02:00
parent 67e68cf790
commit 414ab39d30

View File

@ -726,7 +726,7 @@ class Contact extends CommonObject
if (! $error) if (! $error)
{ {
// Remove category // Remove category
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_contact WHERE fk_socpeople = ".$rowid; $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_contact WHERE fk_socpeople = ".$this->id;
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);
if (! $resql) if (! $resql)
@ -734,8 +734,7 @@ class Contact extends CommonObject
$error++; $error++;
$this->error .= $this->db->lasterror(); $this->error .= $this->db->lasterror();
$errorflag=-1; $errorflag=-1;
dol_syslog(get_class($this)."::delete erreur ".$errorflag." ".$this->error, LOG_ERR); dol_syslog(get_class($this)."::delete error ".$errorflag." ".$this->error, LOG_ERR);
} }
} }
@ -916,7 +915,7 @@ class Contact extends CommonObject
{ {
return $this->LibStatut($this->statut,$mode); return $this->LibStatut($this->statut,$mode);
} }
function getLibStatutcontact() function getLibStatutcontact()
{ {
return $this->LibStatutcontact($this->statut); return $this->LibStatutcontact($this->statut);
@ -975,7 +974,7 @@ class Contact extends CommonObject
elseif ($statut==4) return '<span class="hideonsmartphone">'.$langs->trans('StatusContactValidatedShort').' </span>'.img_picto($langs->trans('StatusContactValidatedShort'),'statut4'); elseif ($statut==4) return '<span class="hideonsmartphone">'.$langs->trans('StatusContactValidatedShort').' </span>'.img_picto($langs->trans('StatusContactValidatedShort'),'statut4');
elseif ($statut==5) return '<span class="hideonsmartphone">'.$langs->trans('StatusContactValidatedShort').' </span>'.img_picto($langs->trans('StatusContactValidatedShort'),'statut5'); elseif ($statut==5) return '<span class="hideonsmartphone">'.$langs->trans('StatusContactValidatedShort').' </span>'.img_picto($langs->trans('StatusContactValidatedShort'),'statut5');
} }
} }
function LibStatutcontact($statut) function LibStatutcontact($statut)
@ -1051,7 +1050,7 @@ class Contact extends CommonObject
$this->socid = $socids[$socid]; $this->socid = $socids[$socid];
$this->statut=1; $this->statut=1;
} }
/** /**
* Change status of a user * Change status of a user
* *