Merge pull request #8561 from frederic34/patch-11

Update combinations.php
This commit is contained in:
Laurent Destailleur 2018-04-11 13:09:34 +02:00 committed by GitHub
commit e642535389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php';
header('Content-Type: application/json');
$id = GETPOST('id');
$id = GETPOST('id', 'int');
if (!$id) {
print json_encode(array(

View File

@ -383,7 +383,7 @@ if (! empty($id) || ! empty($ref))
select.empty().append('<option value="">Loading...</option>');
jQuery.getJSON("<?php echo dol_buildpath('/variants/ajax/get_attribute_values.php', 2) ?>", {
jQuery.getJSON("ajax/get_attribute_values.php", {
id: jQuery(this).val()
}, function(data) {
if (data.error) {
@ -699,8 +699,12 @@ if (! empty($id) || ! empty($ref))
print '</div>';
print '</form>';
}
} else {
llxHeader();
// not found
}
llxFooter();
$db->close();