From 8d118e58bc57a28c36862b2ef526ba9fe5c6bb74 Mon Sep 17 00:00:00 2001 From: Olivier Le Floch Date: Fri, 8 Feb 2008 18:45:15 +0100 Subject: [PATCH] Improve the error messages displayed when doing searches in the directory (too many results, etc.) --- include/userset.inc.php | 2 +- modules/search.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/userset.inc.php b/include/userset.inc.php index 382baa3..6392160 100644 --- a/include/userset.inc.php +++ b/include/userset.inc.php @@ -88,7 +88,7 @@ class SearchSet extends UserSet $qSearch = new QuickSearch('quick'); $fields = new SFieldGroup(true, array($qSearch)); if ($qSearch->isEmpty()) { - new ThrowError('Recherche trop générale.'); + new ThrowError('Aucun critère de recherche n\'est spécifié.'); } $this->score = $qSearch->get_score_statement(); $pwhere = $fields->get_where_statement(); diff --git a/modules/search.php b/modules/search.php index 50af49b..f74b4f5 100644 --- a/modules/search.php +++ b/modules/search.php @@ -143,9 +143,9 @@ class SearchModule extends PLModule if (!S::logged() && $nb_tot > $globals->search->public_max) { new ThrowError('Votre recherche a généré trop de résultats pour un affichage public.'); } elseif ($nb_tot > $globals->search->private_max) { - new ThrowError('Recherche trop générale'); + new ThrowError('Recherche trop générale. Une recherche avancée permet de préciser la recherche.'); } elseif (empty($nb_tot)) { - new ThrowError('il n\'existe personne correspondant à ces critères dans la base !'); + new ThrowError('Il n\'existe personne correspondant à ces critères dans la base !'); } } else { $page->assign('formulaire',1); @@ -204,7 +204,7 @@ class SearchModule extends PLModule $nb_tot = $view->count(); if ($nb_tot > $globals->search->private_max) { $this->form_prepare(); - new ThrowError('Recherche trop générale'); + new ThrowError('Recherche trop générale.'); } } -- 2.1.4