Can set events as being important
[platal.git] / modules / search.php
index d48edda..5b188d4 100644 (file)
@@ -26,8 +26,8 @@ class SearchModule extends PLModule
         return array(
             'search'     => $this->make_hook('quick', AUTH_PUBLIC),
             'search/adv' => $this->make_hook('advanced', AUTH_COOKIE),
-            'search/ajax/region'  => $this->make_hook('region', AUTH_COOKIE, '', NO_AUTH),
-            'search/ajax/grade'   => $this->make_hook('grade',  AUTH_COOKIE, '', NO_AUTH),
+            'search/ajax/region'  => $this->make_hook('region', AUTH_COOKIE, 'user', NO_AUTH),
+            'search/ajax/grade'   => $this->make_hook('grade',  AUTH_COOKIE, 'user', NO_AUTH),
             'advanced_search.php' => $this->make_hook('redir_advanced', AUTH_PUBLIC),
         );
     }
@@ -51,7 +51,7 @@ class SearchModule extends PLModule
         $fields  = new SFieldGroup(true, array($qSearch));
 
         if ($qSearch->isempty()) {
-            new ThrowError('Recherche trop générale.');
+            new ThrowError('Recherche trop générale.');
         }
 
         $sql = 'SELECT SQL_CALC_FOUND_ROWS
@@ -137,7 +137,7 @@ class SearchModule extends PLModule
         $fields = new SFieldGroup(true, advancedSearchFromInput());
         if ($fields->too_large()) {
             $this->form_prepare();
-            new ThrowError('Recherche trop générale.');
+            new ThrowError('Recherche trop générale.');
         }
         global $globals, $page;
 
@@ -198,11 +198,11 @@ class SearchModule extends PLModule
             $nb_tot = $search->show();
 
             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.');
+                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');
             } 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);
@@ -241,7 +241,7 @@ class SearchModule extends PLModule
 
             if ($nb_tot > $globals->search->private_max) {
                 $this->form_prepare();
-                new ThrowError('Recherche trop générale');
+                new ThrowError('Recherche trop générale');
             }
 
         }
@@ -252,7 +252,7 @@ class SearchModule extends PLModule
 
     function handler_region(&$page, $country = null)
     {
-        header('Content-Type: text/html; charset="iso-8859-15"');
+        header('Content-Type: text/html; charset="UTF-8"');
         require_once("geoloc.inc.php");
         $page->ChangeTpl('search/adv.region.form.tpl', NO_SKIN);
         $page->assign('region', "");
@@ -261,11 +261,12 @@ class SearchModule extends PLModule
 
     function handler_grade(&$page, $school = null)
     {
-        header('Content-Type: text/html; charset="iso-8859-15"');
+        header('Content-Type: text/html; charset="UTF-8"');
         $page->ChangeTpl('search/adv.grade.form.tpl', NO_SKIN);
         $page->assign('grade', '');
         $this->get_diplomas($school);
     }
 }
 
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>