closes #163
authorx2000habouzit <x2000habouzit>
Tue, 2 Nov 2004 07:30:47 +0000 (07:30 +0000)
committerx2000habouzit <x2000habouzit>
Tue, 2 Nov 2004 07:30:47 +0000 (07:30 +0000)
htdocs/search.php

index b689c36..fc542e6 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: search.php,v 1.39 2004-11-02 07:28:34 x2000habouzit Exp $
+        $Id: search.php,v 1.40 2004-11-02 07:30:47 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -59,6 +59,11 @@ if (array_key_exists('rechercher', $_REQUEST)) {
     {
        new ThrowError('Recherche trop générale.');
     }
+    
+    if (!logged() && empty($_REQUEST['prenom']) && empty($_REQUEST['nom']))
+    {
+       new ThrowError('Il faut au moins entrer un nom ou un prenom.');
+    }
     $offset = new NumericSField('offset');
    
     $sql = 'SELECT SQL_CALC_FOUND_ROWS