From: Olivier Le Floch Date: Fri, 8 Feb 2008 17:45:15 +0000 (+0100) Subject: Improve the error messages displayed when doing searches in the directory (too many... X-Git-Tag: xorg/0.9.16~159 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=8d118e58bc57a28c36862b2ef526ba9fe5c6bb74;p=platal.git Improve the error messages displayed when doing searches in the directory (too many results, etc.) --- 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.'); } }