changeset 22:3585573999b6

fix error messages when indexing.
author casties
date Wed, 23 Sep 2015 11:54:22 +0200
parents 7b6b064afe5d
children 45a823b5bf33
files ismi_ext/ismi_ext.module
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ismi_ext/ismi_ext.module	Fri Sep 18 18:26:38 2015 +0200
+++ b/ismi_ext/ismi_ext.module	Wed Sep 23 11:54:22 2015 +0200
@@ -2,8 +2,14 @@
 
 // alter indexing
 
-function ismi_ext_apachesolr_index_documents_alter($documents, $entity, $entity_type, $env_id){
-  // hole entities die sich auf diese beziehen
+function ismi_ext_apachesolr_index_documents_alter($documents, $entity, $entity_type, $env_id) {
+	
+	if (!property_exists($entity, "field_attribute")) {
+		// not an openmind_entity
+		return;
+	}
+	
+	// hole entities die sich auf diese beziehen
 
     $attributes = $entity->field_attribute[LANGUAGE_NONE];
 
@@ -11,7 +17,6 @@
     if (isset ($documents[0])){
       foreach ($attributes as $attribute){
 
-
         #attributes als felder in solr
         $txt = $attribute['ov'];