You are here

function apachesolr_multilingual_module_implements_alter in Apache Solr Multilingual 6.3

Same name and namespace in other branches
  1. 7 apachesolr_multilingual.module \apachesolr_multilingual_module_implements_alter()

Implements hook_module_implements_alter().

Move apachesolr_multilingual_apachesolr_query_alter() to the end of the list because we have to wait if someone limits the query to a specific language.

File

./apachesolr_multilingual.module, line 460
Multilingual search using Apache Solr.

Code

function apachesolr_multilingual_module_implements_alter(&$implementations, $hook) {

  // FIXME BACKPORT hook_implements_alter() does not exist
  if (in_array($hook, array(
    'apachesolr_query_alter',
    'apachesolr_field_name_map_alter',
  ))) {
    $group = $implementations['apachesolr_multilingual'];
    unset($implementations['apachesolr_multilingual']);
    $implementations['apachesolr_multilingual'] = $group;

    // This confusing code turns
    // array('a' => '', 'apachesolr_multilingual' => '', 'b' => '')
    // into
    // array('a' => '', 'b' => '', 'apachesolr_multilingual' => '')
  }
}