Changeset 1717


Ignore:
Timestamp:
Oct 10, 2010, 11:47:48 PM (11 years ago)
Author:
roux
Message:

correction résultats pages recherche vide et recherche exemple

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

Legend:

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

    r1702 r1717  
    4848   
    4949    $query = preg_replace('/\*/', '', $this->query);
     50    $query = preg_replace('/\.\.+/', '', $query);
    5051
    5152    $nb = 20;
     
    7677    if (!$this->query) {
    7778        $params['hl'] = 'false';
     79        $query = "*";
    7880    }
    7981
     
    228230        $this->results['docs'][$i]['highlighting'] = preg_replace('/^'."$this->results['docs'][$i]['personne']".'/', '', implode('...', $high_res));
    229231      }
    230       else {
     232      else if ($this->query != "") {
    231233        $this->results['docs'][$i]['highlighting'] = $this->results['docs'][$i]['description'];
    232234        if (strlen($this->results['docs'][$i]['highlighting']) > 700)
  • cpc/trunk/project/apps/frontend/modules/solr/templates/_searchbox.php

    r1623 r1717  
    11  <div class="searchbox">
    2   <form action="">
     2  <form action="<?php echo url_for('@recherche_solr'); ?>" method="get">
    33  <p>
    44     <input name="search" id="search" value="<?php echo str_replace('"', '&quot;', strip_tags($sf_request->getParameter('query'))); ?>" />
  • cpc/trunk/project/apps/frontend/modules/solr/templates/noresultsSuccess.php

    r1714 r1717  
     1<?php $sf_response->setTitle("NosDéputés.fr - Aucun résultat pour votre recherche"); ?>
    12<div class="solr">
    23<?php include_partial('solr/follow', array('query' => $query, 'selected' => array(), 'norss' => true, 'zero' => true)); ?>
Note: See TracChangeset for help on using the changeset viewer.