I created a trivial patch to split apachesolr_index_entity_to_documents() into two functions.

This patch adds apachesolr_entity_to_documents_delegate() to simply isolate some code from apachesolr_index_entity_to_documents(). That simplifies some stuff in apachesolr_multilingual_apachesolr_index_documents_alter() where this same code is required, too.

Currently the code is redundant in apachesolr_multilingual.module which will be hard to maintain and therefore should be avoided.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, delegate.patch, failed testing.

Nick_vh’s picture

+++ apachesolr.index.inc	(revision )
@@ -232,6 +232,22 @@
+ * @param $entity
+ * @param $entity_type

I think we should define the variable types (object, array, etc..)

+++ apachesolr.index.inc	(revision )
@@ -232,6 +232,22 @@
+ * @return array

Give it a description of what exactly it returns

mkalkbrenner’s picture

I completed the documentation and renamed the new function.

mkalkbrenner’s picture

made a mistake, the reseting the user must still happen in apachesolr_index_entity_to_documents(). Now the tests should pass.

mkalkbrenner’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, apachesolr_index_entity_to_documents.patch, failed testing.

mkalkbrenner’s picture

The testbot client is probably malfunctioning.

mkalkbrenner’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, apachesolr_index_entity_to_documents.patch, failed testing.

mkalkbrenner’s picture

Status: Needs work » Needs review
FileSize
2.97 KB

Unable to apply patch.

mkalkbrenner’s picture

Priority: Normal » Major

"major" for release

mkalkbrenner’s picture

Status: Needs review » Reviewed & tested by the community
Nick_vh’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Pushed to 7.x-1.x

mkalkbrenner’s picture

Assigned: Unassigned » mkalkbrenner
Issue summary: View changes
Status: Patch (to be ported) » Needs review
FileSize
4.2 KB

I ported to patch back to 6.x-3.x.
To backport apachesolr_multilingual back to drupal 6 it's essential that this patch gets committed.

mkalkbrenner’s picture

Issue tags: +i18n

  • Commit 28421e9 on 6.x-3.x by mkalkbrenner:
    Issue #1954302 by mkalkbrenner: Added Isolate some re-usable code from...
mkalkbrenner’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.