Merge branch 'xorg/maint' into xorg/master
[platal.git] / modules / search.php
index ff3d8b8..0504a77 100644 (file)
@@ -30,10 +30,10 @@ class SearchModule extends PLModule
             'search/autocomplete'       => $this->make_hook('autocomplete',       AUTH_COOKIE, 'directory_ax', NO_AUTH),
             'search/list'               => $this->make_hook('list',               AUTH_COOKIE, 'directory_ax', NO_AUTH),
             'search/list/count'         => $this->make_hook('list_count',         AUTH_COOKIE, 'directory_ax', NO_AUTH),
-            'jobs'                      => $this->make_hook('referent',           AUTH_COOKIE),
-            'emploi'                    => $this->make_hook('referent',           AUTH_COOKIE),
-            'referent/search'           => $this->make_hook('referent',           AUTH_COOKIE),
-            'search/referent/countries' => $this->make_hook('referent_countries', AUTH_COOKIE),
+            'jobs'                      => $this->make_hook('referent',           AUTH_COOKIE, 'user'),
+            'emploi'                    => $this->make_hook('referent',           AUTH_COOKIE, 'user'),
+            'referent/search'           => $this->make_hook('referent',           AUTH_COOKIE, 'user'),
+            'search/referent/countries' => $this->make_hook('referent_countries', AUTH_COOKIE, 'user'),
         );
     }
 
@@ -121,9 +121,9 @@ class SearchModule extends PLModule
             require_once 'userset.inc.php';
             $view = new QuickSearchSet();
             $view->addMod('minifiche', 'Mini-fiches', true, array('with_score' => true, 'starts_with' => $byletter));
+            $view->addMod('map', 'Planisphère');
             if (S::logged() && !Env::i('nonins')) {
                 $view->addMod('trombi', 'Trombinoscope', false, array('with_promo' => true, 'with_score' => true));
-                $view->addMod('map', 'Planisphère');
             }
             $view->apply('search', $page, $model);
 
@@ -314,7 +314,7 @@ class SearchModule extends PLModule
           case 'administrative_area_level_2':
           case 'locality':
             $page->assign('onchange', 'changeAddressComponents(\'' . $type . '\', this.value)');
-          case 'sublocality':
+          case 'postal_code':
             $ids = XDB::iterator("SELECT  pace1.id, pace1.long_name AS field
                                     FROM  profile_addresses_components_enum AS pace1
                               INNER JOIN  profile_addresses_components      AS pac1  ON (pac1.component_id = pace1.id)