diff --git a/ChangeLog b/ChangeLog index 270e2f3fab0..ed59eec7870 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,9 +19,10 @@ WARNING: Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: * The property ->brouillon has been removed from all classes. It was not reliable and was a duplicate of ->status == self::STATUS_DRAFT. * The method get_substitutionarray_shipment_lines() has been removed. Use the generic get_substitutionarray_lines() instead. -* Recheck setup of your module workflow to see if you need to enable the new setting to have shipment set to billed automatically - when an invoice from a shipment is validated (and if your process is to make invoice on shipment and not on order). -* It was possible to use a variable $soc or $right inside a php code condition of some extrafields properties, this is no more true (this vars are no more defined globaly). +* The method ProductcustomerPrice->fetch_all_log() has been renamed into camel case ->fetchAllLog() +* Recheck setup of your module workflow to see if you need to enable the new setting to have shipment set to billed automatically + when an invoice from a shipment is validated (and if your process is to make invoice on shipment and not on order), because this setup has changed. +* It was possible to use a variable $soc or $right inside a php code condition of some extrafields properties, this is no more true (this variables are no more defined globaly). diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index efd93dc7c89..066c7daa952 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -349,27 +349,6 @@ class ProductCustomerPrice extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Load all customer prices in memory from database - * - * @param string $sortorder order - * @param string $sortfield field - * @param int $limit page - * @param int $offset offset - * @param array $filter Filter for select - * @deprecated since dolibarr v17 use fetchAll - * @return int <0 if KO, >0 if OK - */ - public function fetch_all($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = array()) - { - // phpcs:enable - - dol_syslog(get_class($this)."::fetch_all is deprecated, use fetchAll instead", LOG_NOTICE); - - return $this->fetchAll($sortorder, $sortfield, $limit, $offset, $filter); - } - /** * Load all customer prices in memory from database * @@ -488,7 +467,6 @@ class ProductCustomerPrice extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load all objects in memory from database * @@ -499,11 +477,8 @@ class ProductCustomerPrice extends CommonObject * @param array $filter Filter for sql request * @return int <0 if KO, >0 if OK */ - public function fetch_all_log($sortorder, $sortfield, $limit, $offset, $filter = array()) + public function fetchAllLog($sortorder, $sortfield, $limit, $offset, $filter = array()) { - // phpcs:enable - global $langs; - if (!empty($sortfield)) { $sortfield = "t.rowid"; } @@ -556,7 +531,7 @@ class ProductCustomerPrice extends CommonObject $sql .= $this->db->plimit($limit + 1, $offset); } - dol_syslog(get_class($this)."::fetch_all_log", LOG_DEBUG); + dol_syslog(get_class($this)."::fetchAllLog", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $this->lines = array(); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 713c68c6974..c480a1520a4 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -2107,10 +2107,10 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Count total nb of records $nbtotalofrecords = ''; if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) { - $nbtotalofrecords = $prodcustprice->fetch_all_log($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); + $nbtotalofrecords = $prodcustprice->fetchAllLog($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); } - $result = $prodcustprice->fetch_all_log($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); + $result = $prodcustprice->fetchAllLog($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); if ($result < 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); } diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 78b8375ec2b..b20efad45fe 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -454,7 +454,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Count total nb of records $nbtotalofrecords = ''; - $result = $prodcustprice->fetch_all_log($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); + $result = $prodcustprice->fetchAllLog($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); if ($result < 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); } else {