Merge pull request #23541 from FHenry/16_fix_token

fix: token for scan inventory
This commit is contained in:
Laurent Destailleur 2023-01-18 23:33:00 +01:00 committed by GitHub
commit 6ce20e3bae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -609,7 +609,7 @@ if ($object->id > 0) {
if ($permissiontoadd) {
// Link to launch scan tool
if (!empty($conf->barcode->enabled) || !empty($conf->productbatch->enabled)) {
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=updatebyscaning" class="marginrightonly paddingright marginleftonly paddingleft">'.img_picto('', 'barcode', 'class="paddingrightonly"').$langs->trans("UpdateByScaning").'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=updatebyscaning&token='.currentToken().'" class="marginrightonly paddingright marginleftonly paddingleft">'.img_picto('', 'barcode', 'class="paddingrightonly"').$langs->trans("UpdateByScaning").'</a>';
}
// Link to autofill