From 549fa9003c4b03d3a21f9a1f5f92f2c29db96cf8 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 31 Oct 2013 15:41:41 +0100 Subject: [PATCH] // Small fix with URL rewrite --- controllers/front/SearchController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/front/SearchController.php b/controllers/front/SearchController.php index ce6e3a176..3d8a02648 100644 --- a/controllers/front/SearchController.php +++ b/controllers/front/SearchController.php @@ -94,7 +94,7 @@ class SearchControllerCore extends FrontController $query = Tools::replaceAccentedChars(urldecode($query)); $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']; + $product['link'] .= (strpos($product['link'], '?') === false ? '?' : '&').'search_query='.urlencode($query).'&results='.(int)$search['total']; Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total'])); $nbProducts = $search['total']; $this->pagination($nbProducts);