sample deprecated function

This commit is contained in:
Frédéric France 2022-09-10 13:55:40 +02:00
parent 2b9350cd09
commit e96eee56b0
3 changed files with 22 additions and 4 deletions

View File

@ -789,7 +789,7 @@ if (empty($reshook)) {
$filter = array('t.fk_product' => $prod->id, 't.fk_soc' => $object->thirdparty->id);
$result = $prodcustprice->fetch_all('', '', 0, 0, $filter);
$result = $prodcustprice->fetchAll('', '', 0, 0, $filter);
if ($result >= 0) {
if (count($prodcustprice->lines) > 0) {
$pu_ht = price($prodcustprice->lines[0]->price);

View File

@ -1534,7 +1534,6 @@ abstract class CommonObject
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return array with list of possible values for type of contacts
*
@ -1548,7 +1547,6 @@ abstract class CommonObject
*/
public function listeTypeContacts($source = 'internal', $option = 0, $activeonly = 0, $code = '', $element = '', $excludeelement = '')
{
// phpcs:enable
global $langs, $conf;
$langs->loadLangs(array('bills', 'contracts', 'interventions', 'orders', 'projects', 'propal', 'ticket', 'agenda'));

View File

@ -354,11 +354,31 @@ class Productcustomerprice extends CommonObject
* @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
*
* @param string $sortorder order
* @param string $sortfield field
* @param int $limit page
* @param int $offset offset
* @param array $filter Filter for select
* @return int <0 if KO, >0 if OK
* @since dolibarr v17
*/
public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = array())
{
// phpcs:enable
global $langs;
if (empty($sortfield)) {