upadted to 1.8
This commit is contained in:
@@ -21,9 +21,19 @@ function search_api_views_search_api_index_insert(SearchApiIndex $index) {
|
||||
* Implements hook_search_api_index_update().
|
||||
*/
|
||||
function search_api_views_search_api_index_update(SearchApiIndex $index) {
|
||||
// Check whether index was disabled.
|
||||
if (!$index->enabled && $index->original->enabled) {
|
||||
_search_api_views_index_unavailable($index);
|
||||
}
|
||||
|
||||
// Check whether the indexed fields changed.
|
||||
$old_fields = $index->original->options + array('fields' => array());
|
||||
$old_fields = $old_fields['fields'];
|
||||
$new_fields = $index->options + array('fields' => array());
|
||||
$new_fields = $new_fields['fields'];
|
||||
if ($old_fields != $new_fields) {
|
||||
views_invalidate_cache();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user