[-] BO : #PSFV-221 - Fixed bad ajax return on no manufacturers on the product tab

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12188 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-01-05 13:55:16 +00:00
parent 0787c21bd9
commit 099c3502be
2 changed files with 5 additions and 9 deletions
@@ -1949,13 +1949,11 @@ class AdminProductsControllerCore extends AdminController
public function ajaxProcessProductManufacturers()
{
$manufacturers = Manufacturer::getManufacturers();
if ($manufacturers)
{
$jsonArray = array();
foreach ($manufacturers AS $manufacturer)
$jsonArray[] = '{"optionValue": "'.$manufacturer['id_manufacturer'].'", "optionDisplay": "'.htmlspecialchars(trim($manufacturer['name'])).'"}';
if ($manufacturers)
foreach ($manufacturers AS $manufacturer)
$jsonArray[] = '{"optionValue": "'.$manufacturer['id_manufacturer'].'", "optionDisplay": "'.htmlspecialchars(trim($manufacturer['name'])).'"}';
die('['.implode(',', $jsonArray).']');
}
}
/**