diff --git a/public_html/global_search.php b/public_html/global_search.php
index cc0daafb..374086e5 100644
--- a/public_html/global_search.php
+++ b/public_html/global_search.php
@@ -26,6 +26,10 @@ if(LSsession :: startLSsession()) {
if (LSsession :: globalSearch()) {
$LSaccess = LSsession :: getLSaccess();
$pattern = (isset($_REQUEST['pattern'])?$_REQUEST['pattern']:'');
+ if (empty($pattern)) {
+ LSerror :: addErrorCode(false, _('You must provide pattern for global search.'));
+ LSsession :: redirect('index.php');
+ }
$LSview_actions=array();
$LSview_actions['refresh'] = array (
diff --git a/public_html/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo b/public_html/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo
index e708a926..2bc9eb2d 100644
Binary files a/public_html/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo and b/public_html/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo differ
diff --git a/public_html/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.po b/public_html/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.po
index b69fd35a..6a6b0447 100644
--- a/public_html/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.po
+++ b/public_html/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: LdapSaisie\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-06-17 12:20+0200\n"
+"PO-Revision-Date: 2019-06-17 13:35+0200\n"
"Last-Translator: Benjamin Renard \n"
"Language-Team: LdapSaisie \n"
@@ -78,7 +78,7 @@ msgstr "Importer"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/view.php:156
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsession.php:1417
-#: /home/brenard/dev/ldapsaisie_clean3/public_html/global_search.php:32
+#: /home/brenard/dev/ldapsaisie_clean3/public_html/global_search.php:36
msgid "Refresh"
msgstr "Rafraîchir"
@@ -1980,6 +1980,10 @@ msgstr "a bien été supprimé"
msgid "Do you really want to delete %{displayName} ?"
msgstr "Voulez-vous vraiment supprimer %{displayName} ?"
+#: /home/brenard/dev/ldapsaisie_clean3/public_html/global_search.php:30
+msgid "You must provide pattern for global search."
+msgstr "Vous devez fournir un mot clé pour les recherches globales."
+
#: templates/default/import.tpl:8
msgid "File"
msgstr "Fichier"
diff --git a/public_html/lang/ldapsaisie.pot b/public_html/lang/ldapsaisie.pot
index 8418551b..e2750c7d 100644
--- a/public_html/lang/ldapsaisie.pot
+++ b/public_html/lang/ldapsaisie.pot
@@ -56,7 +56,7 @@ msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/view.php:156
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsession.php:1417
-#: /home/brenard/dev/ldapsaisie_clean3/public_html/global_search.php:32
+#: /home/brenard/dev/ldapsaisie_clean3/public_html/global_search.php:36
msgid "Refresh"
msgstr ""
@@ -1696,6 +1696,10 @@ msgstr ""
msgid "Do you really want to delete %{displayName} ?"
msgstr ""
+#: /home/brenard/dev/ldapsaisie_clean3/public_html/global_search.php:30
+msgid "You must provide pattern for global search."
+msgstr ""
+
#: templates/default/import.tpl:8
msgid "File"
msgstr ""
diff --git a/public_html/templates/default/top.tpl b/public_html/templates/default/top.tpl
index 002c150b..2f4553ff 100644
--- a/public_html/templates/default/top.tpl
+++ b/public_html/templates/default/top.tpl
@@ -32,7 +32,7 @@
{if $globalSearch && $LSaccess}
{/if}