mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Merge pull request #2941 from HRavalomanana/PHRAS-2437_Prod_Overlay_title__the_text_is_repeated_if_more_than_102_caracters_
PHRAS-2437 Prod_Overlay_title__the_text_is_repeated_if_more_than_102_…
This commit is contained in:
@@ -88,7 +88,7 @@ class PhraseanetExtension extends \Twig_Extension
|
|||||||
$highlightValue = $highlights[$field];
|
$highlightValue = $highlights[$field];
|
||||||
|
|
||||||
// if field is multivalued, merge highlighted values with captions ones
|
// if field is multivalued, merge highlighted values with captions ones
|
||||||
if (is_array($value)) {
|
if (is_array($value) && count($value) > 1) {
|
||||||
$highlightValue = array_merge($highlightValue, array_diff($value, array_map(function($value) {
|
$highlightValue = array_merge($highlightValue, array_diff($value, array_map(function($value) {
|
||||||
return str_replace(array('[[em]]', '[[/em]]'), array('', ''), $value);
|
return str_replace(array('[[em]]', '[[/em]]'), array('', ''), $value);
|
||||||
}, $highlightValue)));
|
}, $highlightValue)));
|
||||||
|
Reference in New Issue
Block a user