Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
dab6b5f8a5
@ -446,7 +446,7 @@ class AccountancyCategory // extends CommonObject
|
|||||||
} else {
|
} else {
|
||||||
$this->error = "Error ".$this->db->lasterror();
|
$this->error = "Error ".$this->db->lasterror();
|
||||||
$this->errors[] = $this->error;
|
$this->errors[] = $this->error;
|
||||||
dol_syslog(__METHOD__." ".implode(','.$this->errors), LOG_ERR);
|
dol_syslog(__METHOD__." ".implode(',', $this->errors), LOG_ERR);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -488,7 +488,7 @@ class AccountancyCategory // extends CommonObject
|
|||||||
} else {
|
} else {
|
||||||
$this->error = "Error ".$this->db->lasterror();
|
$this->error = "Error ".$this->db->lasterror();
|
||||||
$this->errors[] = $this->error;
|
$this->errors[] = $this->error;
|
||||||
dol_syslog(__METHOD__." ".implode(','.$this->errors), LOG_ERR);
|
dol_syslog(__METHOD__." ".implode(',', $this->errors), LOG_ERR);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -565,7 +565,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
if (!empty($object->url) && !isValidUrl($object->url)) {
|
if (!empty($object->url) && !isValidUrl($object->url)) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessages('', $langs->trans("ErrorBadUrl", $object->url), 'errors');
|
setEventMessages($langs->trans("ErrorBadUrl", $object->url), null, 'errors');
|
||||||
}
|
}
|
||||||
$public = 0;
|
$public = 0;
|
||||||
if (isset($public)) {
|
if (isset($public)) {
|
||||||
|
|||||||
@ -413,9 +413,9 @@ $result = $api->r->handle();
|
|||||||
|
|
||||||
if (Luracast\Restler\Defaults::$returnResponse) {
|
if (Luracast\Restler\Defaults::$returnResponse) {
|
||||||
// We try to compress the data received data
|
// We try to compress the data received data
|
||||||
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'br') !== false && is_callable('brotli_compress')) {
|
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'br') !== false && is_callable('brotli_compress') && defined('BROTLI_TEXT')) {
|
||||||
header('Content-Encoding: br');
|
header('Content-Encoding: br');
|
||||||
$result = brotli_compress($result, 11, BROTLI_TEXT);
|
$result = brotli_compress($result, 11, constant('BROTLI_TEXT'));
|
||||||
} elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'bz') !== false && is_callable('bzcompress')) {
|
} elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'bz') !== false && is_callable('bzcompress')) {
|
||||||
header('Content-Encoding: bz');
|
header('Content-Encoding: bz');
|
||||||
$result = bzcompress($result, 9);
|
$result = bzcompress($result, 9);
|
||||||
|
|||||||
@ -304,7 +304,7 @@ class BlockedLogAuthority
|
|||||||
$url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s='.$signature.'&b='.$block->signature;
|
$url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s='.$signature.'&b='.$block->signature;
|
||||||
|
|
||||||
$res = getURLContent($url);
|
$res = getURLContent($url);
|
||||||
echo $block->signature.' '.$url.' '.$res.'<br>';
|
echo $block->signature.' '.$url.' '.$res['content'].'<br>';
|
||||||
if ($res === 'blockalreadyadded' || $res === 'blockadded') {
|
if ($res === 'blockalreadyadded' || $res === 'blockadded') {
|
||||||
$block->setCertified();
|
$block->setCertified();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -86,8 +86,8 @@ class DolGeoIP
|
|||||||
dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR);
|
dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} elseif (function_exists('geoip_open')) {
|
} elseif (function_exists('geoip_open') && defined('GEOIP_STANDARD')) {
|
||||||
$this->gi = geoip_open($datfile, GEOIP_STANDARD);
|
$this->gi = geoip_open($datfile, constant('GEOIP_STANDARD'));
|
||||||
} elseif (function_exists('geoip_country_code_by_name')) {
|
} elseif (function_exists('geoip_country_code_by_name')) {
|
||||||
$this->gi = 'NOGI'; // We are using embedded php geoip functions
|
$this->gi = 'NOGI'; // We are using embedded php geoip functions
|
||||||
//print 'function_exists(geoip_country_code_by_name))='.function_exists('geoip_country_code_by_name');
|
//print 'function_exists(geoip_country_code_by_name))='.function_exists('geoip_country_code_by_name');
|
||||||
|
|||||||
@ -2322,7 +2322,7 @@ class EmailCollector extends CommonObject
|
|||||||
'class' => 'compta/facture/class/facture.class.php',
|
'class' => 'compta/facture/class/facture.class.php',
|
||||||
'object' => 'Facture'),
|
'object' => 'Facture'),
|
||||||
'fournisseur/facture' => array('table' => 'facture_fourn',
|
'fournisseur/facture' => array('table' => 'facture_fourn',
|
||||||
'fields' => array('ref', ref_client),
|
'fields' => array('ref', 'ref_client'),
|
||||||
'class' => 'fourn/class/fournisseur.facture.class.php',
|
'class' => 'fourn/class/fournisseur.facture.class.php',
|
||||||
'object' => 'FactureFournisseur'),
|
'object' => 'FactureFournisseur'),
|
||||||
'produit' => array('table' => 'product',
|
'produit' => array('table' => 'product',
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class MailmanSpip
|
|||||||
*/
|
*/
|
||||||
public function isSpipEnabled()
|
public function isSpipEnabled()
|
||||||
{
|
{
|
||||||
if (defined("ADHERENT_USE_SPIP") && (ADHERENT_USE_SPIP == 1)) {
|
if (getDolGlobalInt("ADHERENT_USE_SPIP") == 1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,10 +91,8 @@ class MailmanSpip
|
|||||||
*/
|
*/
|
||||||
public function checkSpipConfig()
|
public function checkSpipConfig()
|
||||||
{
|
{
|
||||||
if (defined('ADHERENT_SPIP_SERVEUR') && defined('ADHERENT_SPIP_USER') && defined('ADHERENT_SPIP_PASS') && defined('ADHERENT_SPIP_DB')) {
|
if (getDolGlobalString('ADHERENT_SPIP_SERVEUR') != '' && getDolGlobalString('ADHERENT_SPIP_USER') != '' && getDolGlobalString('ADHERENT_SPIP_PASS') != '' && getDolGlobalString('ADHERENT_SPIP_DB') != '') {
|
||||||
if (ADHERENT_SPIP_SERVEUR != '' && ADHERENT_SPIP_USER != '' && ADHERENT_SPIP_PASS != '' && ADHERENT_SPIP_DB != '') {
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -781,9 +781,7 @@ class FormProduct
|
|||||||
*/
|
*/
|
||||||
public function selectLotDataList($htmlname = 'batch_id', $empty = 0, $fk_product = 0, $fk_entrepot = 0, $objectLines = array())
|
public function selectLotDataList($htmlname = 'batch_id', $empty = 0, $fk_product = 0, $fk_entrepot = 0, $objectLines = array())
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
dol_syslog(get_class($this)."::selectLotDataList $htmlname, $empty, $fk_product, $fk_entrepot", LOG_DEBUG);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::selectLotDataList $htmlname, $empty, $fk_product, $fk_entrepot,$objectLines", LOG_DEBUG);
|
|
||||||
|
|
||||||
$out = '';
|
$out = '';
|
||||||
$productIdArray = array();
|
$productIdArray = array();
|
||||||
@ -817,7 +815,7 @@ class FormProduct
|
|||||||
if (empty($fk_entrepot) || $fk_entrepot == $arraytypes['entrepot_id']) {
|
if (empty($fk_entrepot) || $fk_entrepot == $arraytypes['entrepot_id']) {
|
||||||
$label = $arraytypes['entrepot_label'] . ' - ';
|
$label = $arraytypes['entrepot_label'] . ' - ';
|
||||||
$label .= $arraytypes['batch'];
|
$label .= $arraytypes['batch'];
|
||||||
$out .= '<option>' . $arraytypes['batch'] . '</option>';
|
$out .= '<option data-warehouse="'.dol_escape_htmltag($label).'">' . $arraytypes['batch'] . '</option>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -574,11 +574,11 @@ if (empty($reshook)) {
|
|||||||
if (!empty($object->email) && !isValidEMail($object->email)) {
|
if (!empty($object->email) && !isValidEMail($object->email)) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages('', $langs->trans("ErrorBadEMail", $object->email), 'errors');
|
setEventMessages($langs->trans("ErrorBadEMail", $object->email), null, 'errors');
|
||||||
}
|
}
|
||||||
if (!empty($object->url) && !isValidUrl($object->url)) {
|
if (!empty($object->url) && !isValidUrl($object->url)) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessages('', $langs->trans("ErrorBadUrl", $object->url), 'errors');
|
setEventMessages($langs->trans("ErrorBadUrl", $object->url), null, 'errors');
|
||||||
}
|
}
|
||||||
if (!empty($object->webservices_url)) {
|
if (!empty($object->webservices_url)) {
|
||||||
//Check if has transport, without any the soap client will give error
|
//Check if has transport, without any the soap client will give error
|
||||||
|
|||||||
@ -962,7 +962,7 @@ function getListOfProductsOrServices($authentication, $filterproduct)
|
|||||||
* Get list of products for a category
|
* Get list of products for a category
|
||||||
*
|
*
|
||||||
* @param array $authentication Array of authentication information
|
* @param array $authentication Array of authentication information
|
||||||
* @param array $id Category id
|
* @param int $id Category id
|
||||||
* @param Translate $lang Force lang
|
* @param Translate $lang Force lang
|
||||||
* @return array Array result
|
* @return array Array result
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user