From: x2003bruneau Date: Mon, 2 Apr 2007 17:25:22 +0000 (+0000) Subject: Fix search failures X-Git-Tag: xorg/0.9.14~130 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=bc67c37cd9da2052d61288d927c913e467e90c41;p=platal.git Fix search failures git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1656 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/modules/search.php b/modules/search.php index bcb6423..4996d5f 100644 --- a/modules/search.php +++ b/modules/search.php @@ -129,6 +129,10 @@ class SearchModule extends PLModule function handler_advanced(&$page, $action = null, $subaction = null) { global $globals; + require_once 'geoloc.inc.php'; + require_once dirname(__FILE__) . '/search/search.inc.php'; + $page->assign('advanced',1); + if (!Env::has('rechercher') && $action != 'geoloc') { $this->form_prepare(); } else { @@ -149,11 +153,8 @@ class SearchModule extends PLModule } } - require_once 'geoloc.inc.php'; - require_once dirname(__FILE__) . '/search/search.inc.php'; $page->changeTpl('search/index.tpl', $action == 'mini' ? SIMPLE : SKINNED); $page->addJsLink('ajax.js'); - $page->assign('advanced',1); $page->assign('public_directory',0); $page->register_modifier('display_lines', 'display_lines'); } diff --git a/modules/search/classes.inc.php b/modules/search/classes.inc.php index 9f788a9..9be8cc4 100644 --- a/modules/search/classes.inc.php +++ b/modules/search/classes.inc.php @@ -101,7 +101,11 @@ class ThrowError */ function ThrowError($explain) { - global $page; + global $page, $globals; + $page->changeTpl('search/index.tpl'); + $page->assign('xorg_title','Polytechnique.org - Annuaire'); + $page->assign('baseurl', $globals->baseurl); + $page->register_modifier('display_lines', 'display_lines'); $page->trig('Erreur : '.$explain); $page->run(); } diff --git a/templates/search/index.tpl b/templates/search/index.tpl index 2a25ee6..9a4457c 100644 --- a/templates/search/index.tpl +++ b/templates/search/index.tpl @@ -29,7 +29,7 @@ {include file=search/adv.links.tpl do_title=1 with_soundex=$with_soundex} {/if} {/if} - + {include file='core/plset.tpl'} {if $search_pages_nb > 1}