Now all modules are in core modules folder

This commit is contained in:
Manuel Cillero 2017-08-08 12:14:45 +02:00
parent 5ba1cdfa0b
commit 05b6a91b0c
1907 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,33 @@
<?php
/**
* @file
* Path generation for Lucene API Search.
*
* Available vars:
* $orginal_keywords: user input
* $types: content types (machine names[])
* $terms: taxonomy terms (tids[])
* $keys: complete search phrase, as core would have done it
*
* To return:
* the complete search path
*
*/
function _custom_search_lucenapi_search($variables) {
$type = 'search/' . variable_get('luceneapi:default_search', 0) . '/' . $variables['keywords'];
$keys = array();
if (count($variables['types']) && !in_array('all', $variables['types'])) {
foreach ($variables['types'] as $t) $keys[] = "type[$t]=$t";
}
if (module_exists('taxonomy') && count($variables['terms'])) {
foreach ($variables['terms'] as $t) $keys[] = "category[$t]=$t";
}
$keys = implode('&', $keys);
return array('path' => $type, 'query' => $keys);
}