// Fixed warning and prepared next commit

This commit is contained in:
Damien Metzger committed 2013-10-31 15:09:14 +01:00
1 parent a97e3927df
commit 9a1b45a8e6
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -93,6 +93,8 @@ class SearchControllerCore extends FrontController
$this->p = abs((int)(Tools::getValue('p', 1))); $this->p = abs((int)(Tools::getValue('p', 1)));
$query = Tools::replaceAccentedChars(urldecode($query)); $query = Tools::replaceAccentedChars(urldecode($query));
$search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay); $search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay);
foreach ($search['result'] as &$product)
$product['link'] .= '&search_query='.urlencode($query).'&results='.(int)$search['total'];
Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total'])); Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total']));
$nbProducts = $search['total']; $nbProducts = $search['total'];
$this->pagination($nbProducts); $this->pagination($nbProducts);
+1 -1
View File
@@ -235,7 +235,7 @@ class BlockCategories extends Module
$resultIds[$row['id_category']] = &$row; $resultIds[$row['id_category']] = &$row;
} }
$blockCategTree = $this->getTree($resultParents, $resultIds, $maxdepth, (isset($category) ? $category->id : null)); $blockCategTree = $this->getTree($resultParents, $resultIds, $maxdepth, ($category ? $category->id : null));
$this->smarty->assign('blockCategTree', $blockCategTree); $this->smarty->assign('blockCategTree', $blockCategTree);
if ($category) if ($category)