X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fsearch.php;h=cd80aebb68c0268f2e96f6a30133eb90b775554e;hb=0702af2967f1dfaae3f13a63e8eabdfd1373a66c;hp=eb01b60ce1e4eeb6c7b4bc3ee0493eaaf5a1fcf2;hpb=956cd5c10a027f75283d91545a5d5feeed1874ef;p=platal.git diff --git a/modules/search.php b/modules/search.php index eb01b60..cd80aeb 100644 --- a/modules/search.php +++ b/modules/search.php @@ -24,19 +24,19 @@ class SearchModule extends PLModule function handlers() { return array( - 'search' => $this->make_hook('quick', AUTH_PUBLIC), - 'search/adv' => $this->make_hook('advanced', AUTH_COOKIE, 'directory_ax'), - 'advanced_search.php' => $this->make_hook('redir_advanced', AUTH_PUBLIC), - 'search/autocomplete' => $this->make_hook('autocomplete', AUTH_COOKIE, 'directory_ax', NO_AUTH), - 'search/list' => $this->make_hook('list', 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), + 'search' => $this->make_hook('quick', AUTH_PUBLIC), + 'search/adv' => $this->make_hook('advanced', AUTH_COOKIE, 'directory_ax'), + 'advanced_search.php' => $this->make_hook('redir_advanced', AUTH_PUBLIC), + 'search/autocomplete' => $this->make_hook('autocomplete', AUTH_COOKIE, 'directory_ax', NO_AUTH), + 'search/list' => $this->make_hook('list', 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), ); } - function handler_redir_advanced(&$page, $mode = null) + function handler_redir_advanced($page, $mode = null) { pl_redirect('search/adv'); exit; @@ -51,7 +51,7 @@ class SearchModule extends PLModule * $model: The way of presenting the results: minifiche, trombi, geoloc. * $byletter: Show only names beginning with this letter */ - function handler_quick(&$page, $model = null, $byletter = null) + function handler_quick($page, $model = null, $byletter = null) { global $globals; @@ -96,8 +96,7 @@ class SearchModule extends PLModule if ($user) { pl_redirect($base . $user->login()); } - $_REQUEST['quick'] = $login; - $_GET['quick'] = $login; + Get::set('quick', $login); } elseif (strpos($quick, 'doc:') === 0) { $url = 'Docs/Recherche?'; $url .= 'action=search&q=' . urlencode(substr($quick, 4)); @@ -147,7 +146,7 @@ class SearchModule extends PLModule /** $model is the way of presenting the results: minifiche, trombi, geoloc. */ - function handler_advanced(&$page, $model = null, $byletter = null) + function handler_advanced($page, $model = null, $byletter = null) { global $globals; $page->assign('advanced',1); @@ -201,7 +200,7 @@ class SearchModule extends PLModule $page->assign('public_directory',0); } - function handler_autocomplete(&$page, $type = null) + function handler_autocomplete($page, $type = null) { // Autocompletion : according to type required, return // a list of results matching with the number of matches. @@ -279,7 +278,7 @@ class SearchModule extends PLModule exit(); } - function handler_list(&$page, $type = null, $idVal = null) + function handler_list($page, $type = null, $idVal = null) { $page->assign('name', $type); $page->assign('with_text_value', true); @@ -336,7 +335,7 @@ class SearchModule extends PLModule break; case 'jobterm': if (Env::has('jtid')) { - JobTerms::ajaxGetBranch(&$page, JobTerms::ONLY_JOBS); + JobTerms::ajaxGetBranch($page, JobTerms::ONLY_JOBS); return; } else { pl_content_headers('text/xml'); @@ -362,7 +361,7 @@ class SearchModule extends PLModule $page->assign('list', $ids); } - function handler_referent(&$page, $action = null, $subaction = null) + function handler_referent($page, $action = null, $subaction = null) { global $globals; @@ -403,7 +402,7 @@ class SearchModule extends PLModule * know about. Only referents linked to term (jtid) are displayed. * @param $jtid id of job term to restrict referents */ - function handler_referent_countries(&$page, $jtid = null) + function handler_referent_countries($page, $jtid = null) { pl_content_headers("text/xml"); $page->changeTpl('include/field.select.tpl', NO_SKIN); @@ -414,8 +413,8 @@ class SearchModule extends PLModule INNER JOIN profile_mentor_term AS mt ON (mt.pid = mp.pid) INNER JOIN profile_job_term_relation AS jtr ON (jtr.jtid_2 = mt.jtid) WHERE jtr.jtid_1 = {?} - GROUP BY iso_3166_1_a2 - ORDER BY country", $jtid); + GROUP BY gc.iso_3166_1_a2 + ORDER BY gc.country", $jtid); $page->assign('list', $it); } }