upadted to 1.8

This commit is contained in:
Bachir Soussi Chiadmi
2013-09-26 15:49:26 +02:00
parent e0ae80791b
commit 128640cd15
52 changed files with 2604 additions and 1015 deletions
@@ -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();
}
}
/**