updated to 7.x-1.11
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Install, update and uninstall functions for the search_api_views module.
|
||||
@@ -24,7 +25,7 @@ function search_api_views_update_7101() {
|
||||
if (!$table_fields) {
|
||||
return;
|
||||
}
|
||||
foreach (views_get_all_views() as $name => $view) {
|
||||
foreach (views_get_all_views() as $view) {
|
||||
if (empty($view->base_table) || empty($table_fields[$view->base_table])) {
|
||||
continue;
|
||||
}
|
||||
@@ -32,7 +33,7 @@ function search_api_views_update_7101() {
|
||||
$fields = $table_fields[$view->base_table];
|
||||
$change |= _search_api_views_update_7101_helper($view->base_field, $fields);
|
||||
if (!empty($view->display)) {
|
||||
foreach ($view->display as $key => &$display) {
|
||||
foreach ($view->display as &$display) {
|
||||
$options = &$display->display_options;
|
||||
if (isset($options['style_options']['grouping'])) {
|
||||
$change |= _search_api_views_update_7101_helper($options['style_options']['grouping'], $fields);
|
||||
@@ -66,8 +67,15 @@ function search_api_views_update_7101() {
|
||||
/**
|
||||
* Helper function for replacing field identifiers.
|
||||
*
|
||||
* @return
|
||||
* TRUE iff the identifier was changed.
|
||||
* @param $field
|
||||
* Some data to be searched for field names that should be altered. Passed by
|
||||
* reference.
|
||||
* @param array $fields
|
||||
* An array mapping Search API field identifiers (as previously used by Views)
|
||||
* to the new, sanitized Views field identifiers.
|
||||
*
|
||||
* @return bool
|
||||
* TRUE if any data was changed, FALSE otherwise.
|
||||
*/
|
||||
function _search_api_views_update_7101_helper(&$field, array $fields) {
|
||||
if (is_array($field)) {
|
||||
|
Reference in New Issue
Block a user