diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index f152ff5cc69..799827a4ebb 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -2183,7 +2183,7 @@ if (!empty($conf->margin->enabled) && $action == 'editline') $(document).ready(function() { var idprod = $("input[name='idprod']").val(); var fournprice = $("input[name='fournprice']").val(); - var token = ''; // For AJAX Call we use old 'token' and not 'newtoken' + var token = ''; // For AJAX Call we use old 'token' and not 'newtoken' if (idprod > 0) { $.post('/fourn/ajax/getSupplierPrices.php', { 'idprod': idprod, diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index d177ce7637c..401e1079d35 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -693,7 +693,8 @@ if (!empty($usemargins) && $user->rights->margins->creer) $("#buying_price").val("").show(); /* Call post to load content of combo list fournprice_predef */ - $.post('/fourn/ajax/getSupplierPrices.php?bestpricefirst=1', { 'idprod': $(this).val(), 'token': '' }, function(data) { + var token = ''; // For AJAX Call we use old 'token' and not 'newtoken' + $.post('/fourn/ajax/getSupplierPrices.php?bestpricefirst=1', { 'idprod': $(this).val(), 'token': token }, function(data) { if (data && data.length > 0) { var options = ''; var defaultkey = ''; var defaultprice = ''; var bestpricefound = 0; diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 6b3639d65eb..b7f0b8d5da1 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -434,7 +434,8 @@ jQuery(document).ready(function() }); /* Init field buying_price and fournprice */ - $.post('/fourn/ajax/getSupplierPrices.php', {'idprod': fk_product ? $line->fk_product : 0; ?>, 'token': ''}, function(data) { + var token = ''; // For AJAX Call we use old 'token' and not 'newtoken' + $.post('/fourn/ajax/getSupplierPrices.php', {'idprod': fk_product ? $line->fk_product : 0; ?>, 'token': token }, function(data) { if (data && data.length > 0) { var options = ''; var trouve=false; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index d57a9b154a3..b5eb35dd2d9 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -988,7 +988,7 @@ if (!defined('NOLOGIN')) $user->getrights(); } -dol_syslog("--- Access to ".$_SERVER["REQUEST_METHOD"].' '.$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09')); +dol_syslog("--- Access to ".$_SERVER["REQUEST_METHOD"].' '.$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').' NOTOKENRENEWAL='.constant('NOTOKENRENEWAL')); //Another call for easy debugg //dol_syslog("Access to ".$_SERVER["PHP_SELF"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST));