// Blocklayered : Fix bug with category_box from ajax-back always empty

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13371 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-02-16 08:31:27 +00:00
parent a17726f8ea
commit 3da09167ba
2 changed files with 5 additions and 5 deletions
@@ -34,10 +34,12 @@ if (substr(Tools::encrypt('blocklayered/index'),0,10) != Tools::getValue('layere
include(dirname(__FILE__).'/blocklayered.php');
$category_box = Tools::getValue('categoryBox');
/* Clean categoryBox before use */
if (isset($_GET['categoryBox']) AND is_array($_GET['categoryBox']))
foreach ($_GET['categoryBox'] AS &$value)
if (is_array($category_box))
foreach ($category_box AS &$value)
$value = (int)$value;
$blockLayered = new BlockLayered();
echo $blockLayered->ajaxCallBackOffice(Tools::getValue('categoryBox'), Tools::getValue('id_layered_filter'));
echo $blockLayered->ajaxCallBackOffice($category_box, Tools::getValue('id_layered_filter'));
-2
View File
@@ -3198,8 +3198,6 @@ class BlockLayered extends Module
{
global $cookie;
$categoryBox = array();
if (!empty($id_layered_filter))
{
$layeredFilter = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT * FROM '._DB_PREFIX_.'layered_filter WHERE id_layered_filter = '.(int)$id_layered_filter);