diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt
index 7ce22e790c3..d4a9b725524 100644
--- a/dev/dolibarr_changes.txt
+++ b/dev/dolibarr_changes.txt
@@ -205,6 +205,8 @@ with
with
foreach ($value[1] as $k => $v) {
+
+
JSGANTT:
--------
* Replace in function JSGantt.taskLink
@@ -233,11 +235,13 @@ JCROP:
* Remove analytics tag into file index.html
+
JQUERYFILETREE:
---------------
* Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors
+
RESTLER:
--------
diff --git a/htdocs/api/index.php b/htdocs/api/index.php
index 70aeae96447..ae84e61ea32 100644
--- a/htdocs/api/index.php
+++ b/htdocs/api/index.php
@@ -61,6 +61,13 @@ if (preg_match('/\/explorer\/swagger\.json/', $_SERVER["PHP_SELF"])) {
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
header('Access-Control-Allow-Headers: Content-Type, Authorization, api_key, DOLAPIKEY');
}
+// When we request url to get an API, we accept Cross site so we can make js API call inside another website
+if (preg_match('/\/api\/index\.php/', $_SERVER["PHP_SELF"])) {
+ header('Access-Control-Allow-Origin: *');
+ header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
+ header('Access-Control-Allow-Headers: Content-Type, Authorization, api_key, DOLAPIKEY');
+}
+
$res = 0;
if (!$res && file_exists("../main.inc.php")) {
@@ -304,7 +311,7 @@ if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' &&
foreach ($listofendpoints as $endpointrule) {
$tmparray = explode(':', $endpointrule);
- if ($classfile == $tmparray[0] && $tmparray[1] == 1) {
+ if (($classfile == $tmparray[0] || $classfile.'api' == $tmparray[0]) && $tmparray[1] == 1) {
$endpointisallowed = true;
break;
}
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 3febcc868a0..abc89ecc1eb 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -1132,18 +1132,16 @@ if ($action == 'create') {
// Ligne info remises tiers
print '
| '.$langs->trans('Discounts').' | ';
if ($soc->remise_percent) {
- print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent);
+ print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent).' ';
} else {
- print $langs->trans("CompanyHasNoRelativeDiscount");
+ print ''.$langs->trans("CompanyHasNoRelativeDiscount").'. ';
}
- print '. ';
$absolute_discount = $soc->getAvailableDiscounts();
if ($absolute_discount) {
- print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency));
+ print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)).'.';
} else {
- print $langs->trans("CompanyHasNoAbsoluteDiscount");
+ print ''.$langs->trans("CompanyHasNoAbsoluteDiscount").'.';
}
- print '.';
print ' |
';
}
@@ -1370,18 +1368,16 @@ if ($action == 'create') {
// Line info of thirdparty discounts
print '| '.$langs->trans('Discount').' | ';
if ($object->thirdparty->remise_percent) {
- print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent);
+ print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent).'. ';
} else {
- print $langs->trans("CompanyHasNoRelativeDiscount");
+ print ''.$langs->trans("CompanyHasNoRelativeDiscount").'. ';
}
$absolute_discount = $object->thirdparty->getAvailableDiscounts();
- print '. ';
if ($absolute_discount) {
- print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency));
+ print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)).'.';
} else {
- print $langs->trans("CompanyHasNoAbsoluteDiscount");
+ print ''.$langs->trans("CompanyHasNoAbsoluteDiscount").'.';
}
- print '.';
print ' |
';
// Date
diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html b/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
index 7fedb694c17..5b7ca132af3 100644
--- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
+++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
@@ -68,7 +68,7 @@
if(window.SwaggerTranslator) {
window.SwaggerTranslator.translate();
}
-
+
addApiKeyAuthorization();
},
onFailure: function(data) {
@@ -83,7 +83,9 @@
showRequestHeaders: false,
showOperationIds: false,
displayOperationIds: false,
- displayRequestDuration: true
+ displayRequestDuration: true,
+ /* @CHANGE LDR Add validatorUrl */
+ validatorUrl: null
});
function addApiKeyAuthorization(){