[*] CORE: original search_query assign to .tpl

Avoid problems with special characters for eg. in polish language like ąźćłó etc.
This commit is contained in:
Krystian Podemski
2013-12-04 17:24:30 +01:00
parent ab71b813be
commit 665c5d155d
+2 -1
View File
@@ -91,6 +91,7 @@ class SearchControllerCore extends FrontController
$this->productSort();
$this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));
$this->p = abs((int)(Tools::getValue('p', 1)));
$original_query = Tools::safeOutput($query);
$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)
@@ -105,7 +106,7 @@ class SearchControllerCore extends FrontController
'products' => $search['result'], // DEPRECATED (since to 1.4), not use this: conflict with block_cart module
'search_products' => $search['result'],
'nbProducts' => $search['total'],
'search_query' => $query,
'search_query' => $original_query,
'homeSize' => Image::getSize(ImageType::getFormatedName('home'))));
}
elseif (($tag = urldecode(Tools::getValue('tag'))) && !is_array($tag))