Changeset 1416


Ignore:
Timestamp:
Sep 25, 2010, 9:56:31 PM (10 years ago)
Author:
teymour
Message:

argument from to sur la recherche

Location:
cpc/trunk/project/apps/frontend/modules/solr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/apps/frontend/modules/solr/actions/actions.class.php

    r1389 r1416  
    8282      $params['facet.date.end'] = $date.'+1'.$period;
    8383      $params['facet.date.gap'] = '+1DAY';
     84    }else {
     85      if ($from = $request->getParameter('from')) {
     86        $to = $request->getParameter('to', 'NOW');
     87        $query .= ' date:['.$from.' TO '.$to.']';
     88        $params['facet.date.start']=$from;
     89        $params['facet.date.end'] = $to;
     90        $params['facet.date.gap'] = '+1MONTH';
     91      }
    8492    }
    8593    $results = $s->search($query, $params, $deb, $nb);
  • cpc/trunk/project/apps/frontend/modules/solr/templates/searchSuccess.php

    r1389 r1416  
    1818<div class="searchbox">
    1919<form>
    20     <input name="search" value="<?php echo $query; ?>" />
     20    <input name="search" value="<?php echo htmlentities($query, ENT_QUOTES); ?>" />
    2121    <input type="submit" value="Rechercher"/>
    2222</form>
Note: See TracChangeset for help on using the changeset viewer.