Changeset 1469
- Timestamp:
- Sep 28, 2010, 5:51:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/apps/frontend/modules/solr/actions/actions.class.php
r1468 r1469 154 154 $high_res = array(); 155 155 foreach($results['highlighting'][$res['id']]['text'] as $h) { 156 if (!preg_match('/=/', $h))157 156 $h = preg_replace('/.*=/', '', $h); 157 array_push($high_res, $h); 158 158 } 159 159 $this->results['docs'][$i]['highlighting'] = preg_replace('/^'."$this->results['docs'][$i]['personne']".'/', '', implode('...', $high_res)); … … 191 191 } 192 192 if (!$results['response']['numFound']) { 193 $this->setTemplate('noresults'); 194 }else{ 195 $this->fdates = array(); 196 $this->fdates['max'] = 1; 197 foreach($results['facet_counts']['facet_dates']['date'] as $date => $nb) { 198 if (preg_match('/^20/', $date)) { 199 $pc = $nb/$results['response']['numFound']; 200 $this->fdates['values'][$date] = array('nb' => $nb, 'pc' => $pc); 201 if ($this->fdates['max'] < $pc) { 202 $this->fdates['max'] = $pc; 203 } 193 if ($format) 194 return ; 195 return $this->setTemplate('noresults'); 196 } 197 $this->fdates = array(); 198 $this->fdates['max'] = 1; 199 foreach($results['facet_counts']['facet_dates']['date'] as $date => $nb) { 200 if (preg_match('/^20/', $date)) { 201 $pc = $nb/$results['response']['numFound']; 202 $this->fdates['values'][$date] = array('nb' => $nb, 'pc' => $pc); 203 if ($this->fdates['max'] < $pc) { 204 $this->fdates['max'] = $pc; 204 205 } 205 206 }
Note: See TracChangeset
for help on using the changeset viewer.