The method ProductcustomerPrice->fetch_all_log() has been renamed into

camel case ->fetchAllLog()
This commit is contained in:
Laurent Destailleur 2023-10-08 21:44:42 +02:00
parent 7939e9e4e9
commit 8740c85ff3
4 changed files with 9 additions and 33 deletions

View File

@ -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).

View File

@ -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();

View File

@ -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');
}

View File

@ -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 {