From 03a2377abc7c1f0eab24452f98dcf02419edfba1 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 2 Aug 2019 12:31:24 +0200 Subject: [PATCH 1/3] Fix: allow access from any other class that inherits Form class. --- htdocs/core/class/html.form.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 713b18582eb..b9b84fb0e4a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -307,7 +307,7 @@ class Form * @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage') * @return string HTML edit in place */ - private function editInPlace($object, $value, $htmlname, $condition, $inputType = 'textarea', $editvalue = null, $extObject = null, $custommsg = null) + protected function editInPlace($object, $value, $htmlname, $condition, $inputType = 'textarea', $editvalue = null, $extObject = null, $custommsg = null) { global $conf; @@ -2362,7 +2362,7 @@ class Form * @param string $filterkey Filter key to highlight * @return void */ - private function constructProductListOption(&$objp, &$opt, &$optJson, $price_level, $selected, $hidepriceinlabel = 0, $filterkey = '') + protected function constructProductListOption(&$objp, &$opt, &$optJson, $price_level, $selected, $hidepriceinlabel = 0, $filterkey = '') { global $langs, $conf, $user, $db; From 7dab396d08e3958447b8bb63474c364d78db6efc Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 12 Aug 2019 17:29:25 +0200 Subject: [PATCH 2/3] Fix: error creating a budget from an intervention --- htdocs/comm/propal/class/propal.class.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 7a24fad83af..1bf1e5a6a69 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2008 Raphael Bertrand - * Copyright (C) 2010-2014 Juanjo Menent + * Copyright (C) 2010-2019 Juanjo Menent * Copyright (C) 2010-2017 Philippe Grand * Copyright (C) 2012-2014 Christophe Battarel * Copyright (C) 2012 Cedric Salvador @@ -1056,14 +1056,6 @@ class Propal extends CommonObject } } - // Add linked object (deprecated, use ->linkedObjectsIds instead) - if (! $error && $this->origin && $this->origin_id) - { - dol_syslog('Deprecated use of linked object, use ->linkedObjectsIds instead', LOG_WARNING); - $ret = $this->add_object_linked(); - if (! $ret) dol_print_error($this->db); - } - /* * Insertion du detail des produits dans la base * Insert products detail in database From ac8bf7b06658a5ac71381611d5e36caf5f6e93cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 15 Aug 2019 19:48:29 +0200 Subject: [PATCH 3/3] Update propal.class.php --- htdocs/comm/propal/class/propal.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 1bf1e5a6a69..a2d1e934d35 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1056,6 +1056,14 @@ class Propal extends CommonObject } } + // Add linked object (deprecated, use ->linkedObjectsIds instead) + if (! $error && $this->origin && $this->origin_id) + { + dol_syslog('Deprecated use of linked object, use ->linkedObjectsIds instead', LOG_WARNING); + $ret = $this->add_object_linked(); + if (! $ret) dol_print_error($this->db); + } + /* * Insertion du detail des produits dans la base * Insert products detail in database