From 63cd2e6fbc18f8c3464433dab24a011e6b901aaf Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 17 Jun 2019 13:39:15 +0200 Subject: [PATCH] Force search pattern global search --- public_html/global_search.php | 4 ++++ .../lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo | Bin 50334 -> 50455 bytes .../lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.po | 8 ++++++-- public_html/lang/ldapsaisie.pot | 6 +++++- public_html/templates/default/top.tpl | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) 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 e708a926d9bb965d329467cc4d0b96c1047f6940..2bc9eb2dfe1f7dbe896ea260938b61ef6810cec6 100644 GIT binary patch delta 6429 zcmXZg3w+P@9>?+T|CpIuj4@`jzs<(T2-`4h?wh%6E_0jM<-a!U(l)fA|H-9DL>nTa zMB*qlk$Z$kB^(`jL=km5%E>LABGGxh`~Ey0dHz1%|L^y`eLmmc|F2gU)mZg>4ezB! zJ}V4==D3UrMxT1dJmC7LK(!ikInpF1=tFgVKTml zG581Sxz2o;XpGkk;v$WPg*YBBU>}U3mu@%{YvT^|!M)f951}t!MGbrdo8qrn6YGcD z1vSPY#GTL|=b#qwBDQ3Fvz-eTZ9YSFbl!=tU>)KcsDbZceSC-wuwH9BfnaPz9FBe% zi|Qu<)$btG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d+a}83UL&1C8}ncuCZ1BBtB1k4yQ4`nXuLt%|#qcoUzWXU^Qxh>o^=o zuD4rz963Rz(FXgE&yCoTxE{T-%O)4Q;8l#n5GszcFr83EdJ+pT{sqo|K8#ep(*I+;5udxW*Z?i?d69*6n zY-j)V!07Gv{J)JF@F#4Fy?5B07o!H;feo<=_4!|@Vr;Tg-z5CMB8W!B4qD{$6EG7O5$6@{+`$l^WwdEmu?Hex#n-Qd0iS)g*rsDP@ix@w)i?`Vx%b;+whKFOq2U2L&>$Q_T!HE6chF9(7j`3Fg{|=4 zsE)l3*_z39T#bFWejUeS++jQ5Qfxtd7u%vc>4+U@B>HgSCC3w}8{fcCyp7s&^O8MA ziKtqb>%iK%t-^Y^6;(^eu`||x#V%+NYT%`)`#hM1`%wS>G`DEPVcH2hvvH^a zXJHI3Mm@OQ`TPVnC%%An@ORXy@O{-zFb=gN=~x4MV+Qucp12H^k`K|X8ArZmXS@)% z62FQmnE$%{a$1F1#P_i;W}UP}xB`0@G2^&f1o#-H|3Dd+k*)P$-r3iaLU1<|M! zHb(V7619*?jwKjDT+>ZM4{SVJaVvbTE2+puz#l)y$1t4#l;;FY!2Ve5S>C|on&oK} zG14{Pvmj!tYpy3M@>$mm&%Vg+uE#xhA}_h-c}_Qc)-}hI6P4+j=_!k9;(DUuP*f+E ztJL##^st9G3K=nBuGyZvm^4>O#j2RZoQkif9CUdnrzW?lSX;Ozzhd$`M_qpdke{rI 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}