From a4cdd7fb92d54751ee8dd4d1ae9561ea861e0d6a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 17 Jan 2009 11:47:21 +0000 Subject: [PATCH] Fix: Update professional phone number --- htdocs/contact.class.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php index 1cc8e07ab23..7a729dc9021 100644 --- a/htdocs/contact.class.php +++ b/htdocs/contact.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2005-2008 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2008 Raphael Bertrand (Resultic) @@ -151,14 +151,10 @@ class Contact extends CommonObject $this->email=trim($this->email); $this->phone_pro=trim($this->phone_pro); - - if (! $this->phone_pro && $this->socid > 0) - { - $soc = new Societe($this->db); - $soc->fetch($this->socid); - $this->phone_pro = $soc->tel; - } - + $this->phone_perso=trim($this->phone_perso); + $this->phone_mobile=trim($this->phone_mobile); + $this->fax=trim($this->fax); + $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET "; if ($this->socid > 0) $sql .= " fk_soc='".addslashes($this->socid)."',"; if ($this->socid == -1) $sql .= " fk_soc=null,";