mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Fix #985 : Thesaurus bouncing
This commit is contained in:
@@ -271,16 +271,21 @@ class caption_record implements caption_interface, cache_cacheableInterface
|
||||
$ret = $searchEngine->build_excerpt($highlight, $fields, $this->record);
|
||||
|
||||
if ($ret) {
|
||||
$n = 0;
|
||||
$n = -1;
|
||||
|
||||
foreach ($fields as $key => $value) {
|
||||
if ( ! isset($fields[$key]))
|
||||
$n++;
|
||||
|
||||
if (!isset($fields[$key])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strpos($fields[$key]['value'], '<a class="bounce" ') !== false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//if(strpos($fields[$key]['value'], '<a ') === false)
|
||||
$fields[$key]['value'] = $ret[$n];
|
||||
|
||||
$n ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user