mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into new-api-rest-tokens
This commit is contained in:
@@ -778,8 +778,8 @@ class ExternalModules
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($request['response']['curl_error_msg'])) {
|
||||
$error_message .= ' - ' . $request['response']['curl_error_msg'];
|
||||
if (!empty($request['curl_error_msg'])) {
|
||||
$error_message .= ' - ' . $request['curl_error_msg'];
|
||||
}
|
||||
|
||||
// Return the formatted error message
|
||||
|
||||
@@ -1293,7 +1293,7 @@ class Conf extends stdClass
|
||||
$this->global->MAIN_MODULE_DOLISTORE_API_SRV = 'https://www.dolistore.com/api/';
|
||||
}
|
||||
if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) {
|
||||
$this->global->MAIN_MODULE_DOLISTORE_API_KEY = 'dolistorecatalogpublickey1234567';
|
||||
$this->global->MAIN_MODULE_DOLISTORE_API_KEY = 'dolistorepublicapi';
|
||||
}
|
||||
|
||||
// Enable by default the CSRF protection by token.
|
||||
|
||||
@@ -178,7 +178,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
|
||||
|
||||
do {
|
||||
if ($maxRedirection < 1) {
|
||||
break;
|
||||
return array('http_code' => 400, 'content' => 'Maximum number of redirections reached', 'curl_error_no' => 1, 'curl_error_msg' => 'Maximum number of redirections reached');
|
||||
}
|
||||
|
||||
curl_setopt($ch, CURLOPT_URL, $newUrl);
|
||||
@@ -192,7 +192,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
|
||||
if (in_array($hosttocheck, array('metadata.google.internal'))) {
|
||||
$info['http_code'] = 400;
|
||||
$info['content'] = 'Error bad hostname '.$hosttocheck.' (Used by Google metadata). This value for hostname is not allowed.';
|
||||
break;
|
||||
return array('http_code' => 400, 'content' => $info['content'], 'curl_error_no' => 1, 'curl_error_msg' => $info['content']);
|
||||
}
|
||||
|
||||
// Clean host name $hosttocheck to convert it into an IP $iptocheck
|
||||
@@ -220,7 +220,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
|
||||
if ($tmpresult) {
|
||||
$info['http_code'] = 400;
|
||||
$info['content'] = $tmpresult;
|
||||
break;
|
||||
return array('http_code' => 400, 'content' => $tmpresult, 'curl_error_no' => 1, 'curl_error_msg' => $tmpresult);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1449,8 +1449,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
||||
|
||||
// Prospect/Customer/Supplier
|
||||
$selected = $object->client;
|
||||
$selectedcustomer = 0;
|
||||
$selectedprospect = 0;
|
||||
$selectedcustomer = (getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==1 || getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==3 ? 1 : 0);
|
||||
$selectedprospect = (getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==2 || getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==3 ? 1 : 0);
|
||||
switch ($selected) {
|
||||
case 1:
|
||||
$selectedcustomer = 1;
|
||||
|
||||
Reference in New Issue
Block a user