X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fsearch.php;h=74d785fbc75bd1f462eeb143492490accfb2dba5;hb=a5878ac19cc6ea75a753470cf68b7d2180d6cd51;hp=f74b4f555785004b94caef737bbe5693e08329c9;hpb=756ff73fbb0cdd01cce2eda27ba18e1cc99bd735;p=platal.git diff --git a/modules/search.php b/modules/search.php index f74b4f5..74d785f 100644 --- a/modules/search.php +++ b/modules/search.php @@ -89,6 +89,9 @@ class SearchModule extends PLModule if (Env::has('quick') || $action == 'geoloc') { $quick = trim(Env::v('quick')); + if (S::logged() && !Env::has('page')) { + $_SESSION['log']->log('search', 'quick=' . $quick); + } $list = 'profile|prf|fiche|fic|referent|ref|mentor'; if (S::has_perms()) { $list .= '|admin|adm|ax'; @@ -180,6 +183,9 @@ class SearchModule extends PLModule 'school' => array('field' => 'id', 'table' => 'applis_def', 'text' => 'text', 'exact' => false), 'city' => array('table' => 'geoloc_city', 'text' => 'name', 'exact' => false) ); + if (!Env::has('page')) { + $_SESSION['log']->log('search', 'adv=' . var_export($_GET, true)); + } foreach ($textFields as $field=>&$query) { if (!Env::v($field) && Env::v($field . 'Txt')) { $res = XDB::query("SELECT {$query['field']} @@ -384,7 +390,7 @@ class SearchModule extends PLModule while ($result = $list->next()) { $nbResults++; if ($nbResults == 11) { - $res .= '...|1'."\n"; + $res .= $q."|-1\n"; } else { $res .= $result['field'].'|'; $res .= $result['nb'];