Skip to content

Commit

Permalink
Merge pull request #191 from ezsystems/ezp-21831-custom_fields_asobje…
Browse files Browse the repository at this point in the history
…ct_false

Fix EZP-21831: eZFind: customfields with asObject=false
  • Loading branch information
yannickroger committed Mar 30, 2015
2 parents ce64d88 + d48bfb1 commit a24aa70
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions search/plugins/ezsolr/ezsolr.php
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,7 @@ protected function buildResultObjects( $resultArray, &$searchCount, $asObjects =
$emit = array();
foreach ( $doc as $fieldName => $fieldValue )
{
// check if field is not in the explicit field list, to keep explode from generating notices.
// check if fieldName contains an _, to keep list() from generating notices.
if ( strpos( $fieldName, '_' ) !== false )
{
list( $prefix, $rest ) = explode( '_', $fieldName, 2 );
Expand All @@ -1684,14 +1684,14 @@ protected function buildResultObjects( $resultArray, &$searchCount, $asObjects =
{
$emit['data_map'][$inner] = ezfSolrStorage::unserializeData( $fieldValue );
}
}
// it may be a field originating from the explicit fieldlist to return, so it should be added for template consumption
// note that the fieldname will be kept verbatim in a substructure 'fields'
elseif( in_array( $fieldName, $params['FieldsToReturn'] ) )
{
$emit['fields'][$fieldName] = $fieldValue;
}

// it may be a field originating from the explicit fieldlist to return, so it should be added for template consumption
// note that the fieldname will be kept verbatim in a substructure 'fields'
elseif ( in_array( $fieldName, $params['FieldsToReturn'] ) )
{
$emit['fields'][$fieldName] = $fieldValue;
}
}
}
$emit['highlight'] = isset( $highLights[$doc[ezfSolrDocumentFieldBase::generateMetaFieldName( 'guid' )]] ) ?
$highLights[$doc[ezfSolrDocumentFieldBase::generateMetaFieldName( 'guid' )]] : null;
Expand Down

0 comments on commit a24aa70

Please sign in to comment.