From 9e28452379b09a8ce26b2344180b053b2ce0ddbe Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Wed, 19 Nov 2014 10:02:01 +0100 Subject: [PATCH 1/2] Fix: remove duplicate code --- htdocs/core/class/commonobject.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 12fee9deb8b..98bee3e052c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2011-2014 Philippe Grand * Copyright (C) 2012 Marcos GarcĂ­a @@ -611,8 +611,6 @@ abstract class CommonObject require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - $thirdparty = new Societe($this->db); $result=$thirdparty->fetch(isset($this->socid)?$this->socid:(isset($this->fk_soc)?$this->fk_soc:$this->fk_thirdparty)); $this->client = $thirdparty; // deprecated From f7206c2a52509115cce007befc9bd85603439b72 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Nov 2014 23:10:30 +0100 Subject: [PATCH 2/2] Fixed: [ bug #1578 ] Cannot create proposal by copy of another one --- htdocs/comm/propal/class/propal.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 16d2edd0e96..12dbbe7d1c1 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -651,7 +651,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers * @return int <0 if KO, >=0 if OK */ - function create($user='', $notrigger=0) + function create($user, $notrigger=0) { global $langs,$conf,$mysoc,$hookmanager; $error=0; @@ -919,7 +919,7 @@ class Propal extends CommonObject { $this->products=$this->lines; - return $this->create(); + return $this->create($user); } /**