mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Add lazy load to caption fields
This commit is contained in:
@@ -50,10 +50,6 @@ class caption_record implements caption_interface, cache_cacheableInterface
|
|||||||
$this->record = $record;
|
$this->record = $record;
|
||||||
$this->databox = $databox;
|
$this->databox = $databox;
|
||||||
|
|
||||||
|
|
||||||
$this->retrieve_fields();
|
|
||||||
|
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +178,7 @@ class caption_record implements caption_interface, cache_cacheableInterface
|
|||||||
protected function highlight_fields($highlight, Array $grep_fields = null, searchEngine_adapter $searchEngine = null)
|
protected function highlight_fields($highlight, Array $grep_fields = null, searchEngine_adapter $searchEngine = null)
|
||||||
{
|
{
|
||||||
$fields = array();
|
$fields = array();
|
||||||
foreach ($this->fields as $meta_struct_id => $field)
|
foreach ($this->retrieve_fields() as $meta_struct_id => $field)
|
||||||
{
|
{
|
||||||
if (is_array($grep_fields) && !in_array($field->get_name(), $grep_fields))
|
if (is_array($grep_fields) && !in_array($field->get_name(), $grep_fields))
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user