From 6ef7f258eac40bf45a98ef6ba5dc4f2c5e3ea312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Gaillard?=
Date: Mon, 4 Nov 2013 10:34:58 +0100
Subject: [PATCH] // small fix
---
classes/Tools.php | 6 ++----
modules/blocksearch/blocksearch-top.tpl | 4 ++--
modules/blocksearch/blocksearch.php | 13 +++++++++++--
modules/blocksearch/blocksearch.tpl | 2 +-
themes/default/modules/blocksearch/blocksearch.tpl | 2 +-
5 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/classes/Tools.php b/classes/Tools.php
index 1ee27abca..dc6a74cd4 100644
--- a/classes/Tools.php
+++ b/classes/Tools.php
@@ -672,10 +672,8 @@ class ToolsCore
public static function htmlentitiesUTF8($string, $type = ENT_QUOTES)
{
if (is_array($string))
- {
- $string = array_map(array('Tools', 'htmlentitiesUTF8'), $string);
- return (string)array_shift($string);
- }
+ return array_map(array('Tools', 'htmlentitiesUTF8'), $string);
+
return htmlentities((string)$string, $type, 'utf-8');
}
diff --git a/modules/blocksearch/blocksearch-top.tpl b/modules/blocksearch/blocksearch-top.tpl
index 83b247f89..43de6b86e 100644
--- a/modules/blocksearch/blocksearch-top.tpl
+++ b/modules/blocksearch/blocksearch-top.tpl
@@ -29,7 +29,7 @@
-
+
{else}
@@ -41,7 +41,7 @@
-
+
diff --git a/modules/blocksearch/blocksearch.php b/modules/blocksearch/blocksearch.php
index 0d8ffbb8a..b96e3caea 100644
--- a/modules/blocksearch/blocksearch.php
+++ b/modules/blocksearch/blocksearch.php
@@ -84,7 +84,11 @@ public function hookDisplayMobileHeader($params)
if (Tools::getValue('search_query') || !$this->isCached('blocksearch.tpl', $this->getCacheId()))
{
$this->calculHookCommon($params);
- $this->smarty->assign('blocksearch_type', 'block');
+ $this->smarty->assign(array(
+ 'blocksearch_type' => 'block',
+ 'search_query' => (string)Tools::getValue('search_query')
+ )
+ );
}
return $this->display(__FILE__, 'blocksearch.tpl', Tools::getValue('search_query') ? null : $this->getCacheId());
}
@@ -94,7 +98,12 @@ public function hookDisplayMobileHeader($params)
if (Tools::getValue('search_query') || !$this->isCached('blocksearch-top.tpl', $this->getCacheId('blocksearch-top')))
{
$this->calculHookCommon($params);
- $this->smarty->assign('blocksearch_type', 'top');
+ $this->smarty->assign(array(
+ 'blocksearch_type' => 'top',
+ 'search_query' => (string)Tools::getValue('search_query')
+ )
+ );
+
}
return $this->display(__FILE__, 'blocksearch-top.tpl', Tools::getValue('search_query') ? null : $this->getCacheId('blocksearch-top'));
diff --git a/modules/blocksearch/blocksearch.tpl b/modules/blocksearch/blocksearch.tpl
index ce9b45f74..4d89e8a99 100644
--- a/modules/blocksearch/blocksearch.tpl
+++ b/modules/blocksearch/blocksearch.tpl
@@ -32,7 +32,7 @@
-
+
diff --git a/themes/default/modules/blocksearch/blocksearch.tpl b/themes/default/modules/blocksearch/blocksearch.tpl
index 92d286177..e4d2cc745 100644
--- a/themes/default/modules/blocksearch/blocksearch.tpl
+++ b/themes/default/modules/blocksearch/blocksearch.tpl
@@ -32,7 +32,7 @@
-
+