| 5 |
*/ |
*/ |
| 6 |
|
|
| 7 |
/** |
/** |
| 8 |
* Implementation of hook_nd_buildmodes_alter(). |
* Implementation of hook_ds_buildmodes_alter(). |
| 9 |
*/ |
*/ |
| 10 |
function nd_search_nd_buildmodes_alter(&$build_modes) { |
function nd_search_ds_buildmodes_alter(&$build_modes) { |
| 11 |
if (!variable_get('nd_overrule_search', FALSE)) { |
if (!variable_get('nd_overrule_search', FALSE)) { |
| 12 |
unset($build_modes[NODE_BUILD_SEARCH_RESULT]); |
unset($build_modes[NODE_BUILD_SEARCH_RESULT]); |
| 13 |
} |
} |
| 71 |
function _solr_document_to_node($doc) { |
function _solr_document_to_node($doc) { |
| 72 |
$node_serialized = $doc['node']->getField('tm_node'); |
$node_serialized = $doc['node']->getField('tm_node'); |
| 73 |
$node = unserialize($node_serialized['value']); |
$node = unserialize($node_serialized['value']); |
| 74 |
|
// Fallback. |
| 75 |
|
if (empty($node)) { |
| 76 |
|
$nid = $doc['node']->getFields('nid'); |
| 77 |
|
$node = node_load($nid); |
| 78 |
|
} |
| 79 |
return $node; |
return $node; |
| 80 |
} |
} |
| 81 |
|
|