From e54806b0c5eb38949edf15ce1cfa602a4cf27dd2 Mon Sep 17 00:00:00 2001 From: Jonathan Hunt Date: Tue, 14 Dec 2021 20:36:53 +1300 Subject: [PATCH] Update Views to 7.x-3.25 --- .../all/modules/contrib/views/README.txt | 60 +++++++++----- .../handlers/views_handler_area_result.inc | 56 ++++++++++++- .../views/handlers/views_handler_field.inc | 17 ++++ .../handlers/views_handler_field_date.inc | 15 ++-- .../handlers/views_handler_field_entity.inc | 4 +- .../handlers/views_handler_field_numeric.inc | 4 +- .../views/handlers/views_handler_filter.inc | 11 ++- .../handlers/views_handler_filter_combine.inc | 3 + .../handlers/views_handler_filter_date.inc | 10 ++- ...ews_handler_relationship_groupwise_max.inc | 2 +- .../contrib/views/help/advanced-settings.html | 2 +- .../modules/contrib/views/includes/admin.inc | 58 +++++++++++++- .../modules/contrib/views/includes/ajax.inc | 6 +- .../contrib/views/includes/analyze.inc | 6 +- .../modules/contrib/views/includes/view.inc | 4 + .../all/modules/contrib/views/js/ajax_view.js | 12 ++- .../modules/contrib/views/js/views-admin.js | 2 +- .../views/modules/comment.views_default.inc | 23 +++--- .../contrib/views/modules/field.views.inc | 8 ++ .../views/modules/node.views_default.inc | 59 +++++++------- .../node/views_handler_field_node_type.inc | 2 +- .../views/modules/search.views_default.inc | 25 +++--- .../modules/statistics.views_default.inc | 14 ++-- .../views/modules/taxonomy.views_default.inc | 18 ++--- .../user/views_handler_filter_user_name.inc | 1 + .../views_handler_filter_user_permissions.inc | 2 +- .../views/plugins/views_plugin_cache.inc | 16 ++-- .../views/plugins/views_plugin_display.inc | 9 ++- .../plugins/views_plugin_exposed_form.inc | 5 +- .../plugins/views_plugin_query_default.inc | 10 +-- .../plugins/views_plugin_style_jump_menu.inc | 2 +- .../views_plugin_style_summary_jump_menu.inc | 2 +- .../views_ui_base_views_wizard.class.php | 2 +- ...ews_handler_argument_comment_user_uid.test | 7 +- .../views/tests/field/views_fieldapi.test | 7 +- .../contrib/views/tests/views_glossary.test | 49 +++++++++--- .../contrib/views/tests/views_test.info | 6 +- .../views/tests/views_test.views_default.inc | 80 ++++++++++--------- .../all/modules/contrib/views/theme/theme.inc | 12 ++- .../all/modules/contrib/views/views.api.php | 18 +++-- .../all/modules/contrib/views/views.info | 6 +- .../all/modules/contrib/views/views.module | 47 +++++++++-- .../all/modules/contrib/views/views_ui.info | 6 +- 43 files changed, 483 insertions(+), 225 deletions(-) diff --git a/docroot/sites/all/modules/contrib/views/README.txt b/docroot/sites/all/modules/contrib/views/README.txt index 3e361c5d..9064e016 100644 --- a/docroot/sites/all/modules/contrib/views/README.txt +++ b/docroot/sites/all/modules/contrib/views/README.txt @@ -1,21 +1,36 @@ CONTENTS OF THIS FILE --------------------- - + * Introduction * Requirements * Installation * Configuration - * Recommended + * Troubleshooting INTRODUCTION ------------ -Welcome to Views 3. Please see the advanced help for more information. +The Views module allows you to fetch content from the database and present it +to the user in a number of ways (lists, posts, maps, graphs, galleries, tables, +menu items, blocks, reports, forum posts, and so on). + +Views provides a graphical interface to an SQL query builder that can access +virtually any information in your database, and then display it in any format. + +You can also use Views to present related content. For example, you can +display a list of users along with links to the content they have created. + +NOTE: Some of the advanced features require additional modules to be installed. + + * For a full description of the module, visit the project page: + https://www.drupal.org/project/views + + * To submit bug reports and feature suggestions, or track changes: + https://www.drupal.org/project/issues/views -If you're having trouble installing this module, please ensure that your tar -program is not flattening the directory tree, truncating filenames or losing -files. + * To find additional modules extending the functionality of Views: + https://drupal.org/taxonomy/term/89 REQUIREMENTS @@ -29,22 +44,31 @@ This module requires the following modules: INSTALLATION ------------ -Install as you would normally install a contributed Drupal module. See: -https://drupal.org/documentation/install/modules-themes/modules-7 for further -information. + * Install as you would normally install a contributed Drupal module. Visit + https://www.drupal.org/node/895232/ for further information. Navigate to administer >> modules. Enable Views and Views UI. -RECOMMENDED ------------ +CONFIGURATION +------------- + + * Configure the user permissions in Administration » People » Permissions: + + - Administer views + + Access the views administration pages. + + - Bypass views access control + + Bypass access control when accessing views. + + * Customize Views settings in Administration » Structure » Views » Settings. + Use the 'Basic' and 'Advanced' tabs to configure Views. - * SimpleViews (https://www.drupal.org/project/simpleviews): - If you're new to Views, try the Simple Views which can create some often used - Views for you, this might save you some time. - * Advanced help (https://www.drupal.org/project/advanced_help): - If you enable the advanced help, Views will provide more and better help. +TROUBLESHOOTING +--------------- - * Here you can find many modules extending the functionality of Views: - http://drupal.org/taxonomy/term/89 + * Additional help is available by installing the Advanced Help module at: + https://drupal.org/project/advanced_help diff --git a/docroot/sites/all/modules/contrib/views/handlers/views_handler_area_result.inc b/docroot/sites/all/modules/contrib/views/handlers/views_handler_area_result.inc index dd51bf17..4390fbef 100644 --- a/docroot/sites/all/modules/contrib/views/handlers/views_handler_area_result.inc +++ b/docroot/sites/all/modules/contrib/views/handlers/views_handler_area_result.inc @@ -22,6 +22,12 @@ class views_handler_area_result extends views_handler_area { 'default' => 'Displaying @start - @end of @total', 'translatable' => TRUE, ); + $options['format_plural'] = array('default' => FALSE, 'bool' => TRUE); + $options['format_plural_count'] = array('default' => '@total'); + $options['format_plural_plural'] = array( + 'default' => '', + 'translatable' => TRUE, + ); return $options; } @@ -51,6 +57,37 @@ class views_handler_area_result extends views_handler_area { '#default_value' => $this->options['content'], '#description' => t('You may use HTML code in this field. The following tokens are supported:') . $list, ); + $form['format_plural'] = array( + '#type' => 'checkbox', + '#title' => t('Format plural'), + '#description' => t('If checked, special handling will be used for plurality.'), + '#default_value' => $this->options['format_plural'], + ); + $form['format_plural_count'] = array( + '#type' => 'select', + '#title' => t('Count token'), + '#description' => t('Token used to select plural format.'), + '#default_value' => $this->options['format_plural_count'], + '#options' => drupal_map_assoc(array( + '@start', + '@end', + '@total', + '@name', + '@per_page', + '@current_page', + '@current_record_count', + '@page_count' + )), + '#dependency' => array('edit-options-format-plural' => array(TRUE)), + ); + $form['format_plural_plural'] = array( + '#title' => t('Plural form'), + '#type' => 'textarea', + '#rows' => 3, + '#default_value' => $this->options['format_plural_plural'], + '#description' => t('Text to use for the plural form.'), + '#dependency' => array('edit-options-format-plural' => array(TRUE)), + ); } /** @@ -100,8 +137,23 @@ class views_handler_area_result extends views_handler_area { foreach ($items as $item) { $replacements["@$item"] = ${$item}; } - // Send the output. - if (!empty($total) || !empty($this->options['empty'])) { + // If the format_plural option is selected, + if ( + !empty($this->options['format_plural']) + // and the format_plural_count token is not "@end": + && $replacements[$this->options['format_plural_count']] != 1 + ) { + $format = $this->options['format_plural_plural']; + } + // If there is an item count, + if ( + !empty($total) + // or there is content in the empty area, + || !empty($this->options['empty']) + // and a query has been performed: + && !empty($this->view->build_info['count_query']) + ) { + // Adds the result to the output. // We don't want to sanitize with filter_xss_admin() here because Views // administrators are trusted users and should be allowed to insert // arbitrary markup. diff --git a/docroot/sites/all/modules/contrib/views/handlers/views_handler_field.inc b/docroot/sites/all/modules/contrib/views/handlers/views_handler_field.inc index d592ef2a..728a646c 100644 --- a/docroot/sites/all/modules/contrib/views/handlers/views_handler_field.inc +++ b/docroot/sites/all/modules/contrib/views/handlers/views_handler_field.inc @@ -73,6 +73,13 @@ class views_handler_field extends views_handler { */ public $additional_fields = array(); + /** + * Keeps track of the last render index. + * + * @var int|NULL + */ + protected $last_render_index = NULL; + /** * Construct a new field handler. */ @@ -1072,6 +1079,11 @@ If you would like to have the characters \'[\' and \']\' please use the html ent * text-replacement rendering is necessary. */ public function advanced_render($values) { + // Clean up values from previous render calls. + if ($this->last_render_index != $this->view->row_index) { + $this->last_render_text = ''; + } + if ($this->allow_advanced_render() && method_exists($this, 'render_item')) { $raw_items = $this->get_items($values); // If there are no items, set the original value to NULL. @@ -1130,6 +1142,11 @@ If you would like to have the characters \'[\' and \']\' please use the html ent } } + // If we rendered something, update the last render index. + if ((string) $this->last_render !== '') { + $this->last_render_index = $this->view->row_index; + } + return $this->last_render; } diff --git a/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_date.inc b/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_date.inc index cd0838bf..fc50fe96 100644 --- a/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_date.inc +++ b/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_date.inc @@ -147,12 +147,16 @@ class views_handler_field_date extends views_handler_field { $value = strtotime($value); } - $format = $this->options['date_format']; - if (in_array($format, $this->supported_date_types())) { - $custom_format = $this->options['custom_date_format']; - } - if ($value) { + $format = $this->options['date_format']; + + // The custom format can be either a number or a string, depending upon + // what format is being used. + $custom_format = NULL; + if (in_array($format, $this->supported_date_types())) { + $custom_format = $this->options['custom_date_format']; + } + $timezone = !empty($this->options['timezone']) ? $this->options['timezone'] : NULL; // Will be positive for a datetime in the past (ago), and negative for a // datetime in the future (hence). @@ -205,6 +209,7 @@ class views_handler_field_date extends views_handler_field { return format_date($value, $format, $custom_format, $timezone); default: + // The custom format is not used in this scenario. return format_date($value, $format, '', $timezone); } } diff --git a/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_entity.inc b/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_entity.inc index f255e045..135d4ad4 100644 --- a/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_entity.inc +++ b/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_entity.inc @@ -50,12 +50,12 @@ class views_handler_field_entity extends views_handler_field { * Overriden to add the field for the entity id. */ public function query() { - $this->table_alias = $base_table = $this->view->base_table; + $this->table_alias = $this->view->base_table; $this->base_field = $this->view->base_field; if (!empty($this->relationship)) { foreach ($this->view->relationship as $relationship) { - if ($relationship->alias == $this->relationship) { + if (isset($relationship->alias) && $relationship->alias == $this->relationship) { $base_table = $relationship->definition['base']; $this->table_alias = $relationship->alias; diff --git a/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_numeric.inc b/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_numeric.inc index b8de0fde..0d826b1a 100644 --- a/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_numeric.inc +++ b/docroot/sites/all/modules/contrib/views/handlers/views_handler_field_numeric.inc @@ -27,8 +27,8 @@ class views_handler_field_numeric extends views_handler_field { $options['decimal'] = array('default' => '.', 'translatable' => TRUE); $options['separator'] = array('default' => ',', 'translatable' => TRUE); $options['format_plural'] = array('default' => FALSE, 'bool' => TRUE); - $options['format_plural_singular'] = array('default' => '1'); - $options['format_plural_plural'] = array('default' => '@count'); + $options['format_plural_singular'] = array('default' => '1', 'translatable' => TRUE); + $options['format_plural_plural'] = array('default' => '@count', 'translatable' => TRUE); $options['prefix'] = array('default' => '', 'translatable' => TRUE); $options['suffix'] = array('default' => '', 'translatable' => TRUE); diff --git a/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter.inc b/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter.inc index b6e06df6..e7d698cc 100644 --- a/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter.inc +++ b/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter.inc @@ -1191,7 +1191,9 @@ class views_handler_filter extends views_handler { if ($type == 'value' && empty($this->always_required) && empty($this->options['expose']['required']) && $form['#type'] == 'select' && empty($form['#multiple'])) { $any_label = variable_get('views_exposed_filter_any_label', 'new_any') == 'old_any' ? t('') : t('- Any -'); $form['#options'] = array('All' => $any_label) + $form['#options']; - $form['#default_value'] = 'All'; + if (empty($form['#default_value'])) { + $form['#default_value'] = 'All'; + } } if (!empty($this->options['expose']['required'])) { @@ -1382,7 +1384,12 @@ class views_handler_filter extends views_handler { } if (!empty($this->options['expose']['identifier'])) { - $value = $input[$this->options['expose']['identifier']]; + if (isset($input[$this->options['expose']['identifier']])) { + $value = $input[$this->options['expose']['identifier']]; + } + else { + return FALSE; + } // Various ways to check for the absence of non-required input. if (empty($this->options['expose']['required'])) { diff --git a/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter_combine.inc b/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter_combine.inc index e7abb4e5..76aa89ec 100644 --- a/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter_combine.inc +++ b/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter_combine.inc @@ -194,6 +194,9 @@ class views_handler_filter_combine extends views_handler_filter_string { * */ public function op_regex($field) { + if (empty($this->value)) { + return; + } $placeholder = $this->placeholder(); $this->query->add_where_expression($this->options['group'], "$field RLIKE $placeholder", array($placeholder => $this->value)); } diff --git a/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter_date.inc b/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter_date.inc index 26fb1a37..b6bf3c41 100644 --- a/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter_date.inc +++ b/docroot/sites/all/modules/contrib/views/handlers/views_handler_filter_date.inc @@ -141,7 +141,10 @@ class views_handler_filter_date extends views_handler_filter_numeric { } // Store this because it will get overwritten. - $type = $this->value['type']; + $type = ''; + if (is_array($this->value)) { + $type = $this->value['type']; + } $rc = parent::accept_exposed_input($input); // Don't filter if value(s) are empty. @@ -165,7 +168,10 @@ class views_handler_filter_date extends views_handler_filter_numeric { } // Restore what got overwritten by the parent. - $this->value['type'] = $type; + if (is_array($this->value)) { + $this->value['type'] = $type; + } + return $rc; } diff --git a/docroot/sites/all/modules/contrib/views/handlers/views_handler_relationship_groupwise_max.inc b/docroot/sites/all/modules/contrib/views/handlers/views_handler_relationship_groupwise_max.inc index 10f69711..5b172d28 100644 --- a/docroot/sites/all/modules/contrib/views/handlers/views_handler_relationship_groupwise_max.inc +++ b/docroot/sites/all/modules/contrib/views/handlers/views_handler_relationship_groupwise_max.inc @@ -90,7 +90,7 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi $form['subquery_sort'] = array( '#type' => 'select', '#title' => t('Representative sort criteria'), - // Provide the base field as sane default sort option. + // Provide the base field as the default sort option. '#default_value' => !empty($this->options['subquery_sort']) ? $this->options['subquery_sort'] : $this->definition['base'] . '.' . $base_table_data['table']['base']['field'], '#options' => $sort_options, '#description' => theme('advanced_help_topic', array('module' => 'views', 'topic' => 'relationship-representative')) . diff --git a/docroot/sites/all/modules/contrib/views/help/advanced-settings.html b/docroot/sites/all/modules/contrib/views/help/advanced-settings.html index 6a168590..5ba70da1 100644 --- a/docroot/sites/all/modules/contrib/views/help/advanced-settings.html +++ b/docroot/sites/all/modules/contrib/views/help/advanced-settings.html @@ -24,7 +24,7 @@
  • Distinct: No
  • This will make the view display only distinct items. If there are multiple identical items, each will be displayed only once. You can use this to try and remove duplicates from a view, though it does not always work. Note that this can slow queries down, so use it with caution. -
  • Use Slave Server
  • +
  • Use Replica Server
  • Query Comment
  • diff --git a/docroot/sites/all/modules/contrib/views/includes/admin.inc b/docroot/sites/all/modules/contrib/views/includes/admin.inc index 810c70fc..cc687829 100644 --- a/docroot/sites/all/modules/contrib/views/includes/admin.inc +++ b/docroot/sites/all/modules/contrib/views/includes/admin.inc @@ -113,10 +113,11 @@ function views_ui_check_advanced_help() { * Returns the results of the live preview. */ function views_ui_preview($view, $display_id, $args = array()) { + $temp_args = func_get_args(); // When this function is invoked as a page callback, each Views argument is // passed separately. if (!is_array($args)) { - $args = array_slice(func_get_args(), 2); + $args = array_slice($temp_args, 2); } // Save $_GET['q'] so it can be restored before returning from this function. @@ -1379,6 +1380,38 @@ function views_ui_edit_form_submit_duplicate_display($form, &$form_state) { $form_state['redirect'] = 'admin/structure/views/view/' . $view->name . '/edit/' . $new_display_id; } +/** + * Submit handler to clone a display as another display type. + */ +function views_ui_edit_form_submit_clone_display_as_type($form, &$form_state) { + $view = $form_state['view']; + $display_id = $form_state['display_id']; + + // Create the new display. + $parents = $form_state['triggering_element']['#parents']; + $display_type = array_pop($parents); + $new_display_id = $view->add_display($display_type); + + // Let the display title be generated by the add_display method and set the + // right display plugin, but keep the rest from the original display. + $display_clone = clone $view->display[$display_id]; + unset($display_clone->display_title); + unset($display_clone->display_plugin); + $new_display_array = drupal_array_merge_deep((array) $view->display[$new_display_id], (array) $display_clone); + foreach ($new_display_array as $key => $value) { + $view->display[$new_display_id]->{$key} = $value; + } + $view->display[$new_display_id]->id = $new_display_id; + + // By setting the current display the changed marker will appear on the new + // display. + $view->current_display = $new_display_id; + views_ui_cache_set($view); + + // Redirect to the new display's edit page. + $form_state['redirect'] = 'admin/structure/views/view/' . $view->name . '/edit/' . $new_display_id; +} + /** * Submit handler to delete a display from a view. */ @@ -1665,6 +1698,25 @@ function views_ui_get_display_tab_details($view, $display) { '#prefix' => '<' . $item_element . ' class="duplicate">', "#suffix" => '', ); + + foreach (views_fetch_plugin_names('display', NULL, array($view->base_table)) as $type => $label) { + if ($type == $display->display_plugin) { + continue; + } + + $build['top']['actions']['clone_as'][$type] = array( + '#type' => 'submit', + '#value' => t('clone as @type', array('@type' => $label)), + '#limit_validation_errors' => array(), + '#submit' => array( + 'views_ui_edit_form_submit_clone_display_as_type', + 'views_ui_edit_form_submit_delay_destination', + ), + '#prefix' => '<' . $item_element . ' class="duplicate">', + "#suffix" => '', + ); + } + } if ($is_deletable) { $build['top']['actions']['delete'] = array( @@ -2114,7 +2166,7 @@ function views_ui_import_validate($form, &$form_state) { } } else { - if ($test->vid) { + if (!empty($test->vid)) { $view->vid = $test->vid; } } @@ -4907,7 +4959,7 @@ function views_ui_admin_settings_basic() { $form['basic']['views_ui_show_master_display'] = array( '#type' => 'checkbox', - '#title' => t('Always show the master display'), + '#title' => t('Always show the master (default) display'), '#description' => t('Advanced users of views may choose to see the master (i.e. default) display.'), '#default_value' => variable_get('views_ui_show_master_display', FALSE), ); diff --git a/docroot/sites/all/modules/contrib/views/includes/ajax.inc b/docroot/sites/all/modules/contrib/views/includes/ajax.inc index 8f560977..3b4dc9ac 100644 --- a/docroot/sites/all/modules/contrib/views/includes/ajax.inc +++ b/docroot/sites/all/modules/contrib/views/includes/ajax.inc @@ -40,6 +40,8 @@ function views_ajax() { unset($cleaned_post[$key]); } } + // Remove the HTML IDs passed in via AJAX. + unset($_POST['ajax_html_ids']); // Load the view. $view = views_get_view($name); @@ -69,7 +71,9 @@ function views_ajax() { // Override the display's pager_element with the one actually used. if (isset($pager_element)) { $commands[] = views_ajax_command_scroll_top('.view-dom-id-' . $dom_id); - $view->display[$display_id]->handler->set_option('pager_element', $pager_element); + $pager = $view->display[$display_id]->handler->get_option('pager'); + $pager['options']['id'] = $pager_element; + $view->display[$display_id]->handler->set_option('pager', $pager); } // Reuse the same DOM id so it matches that in Drupal.settings. $view->dom_id = $dom_id; diff --git a/docroot/sites/all/modules/contrib/views/includes/analyze.inc b/docroot/sites/all/modules/contrib/views/includes/analyze.inc index 47042028..94093891 100644 --- a/docroot/sites/all/modules/contrib/views/includes/analyze.inc +++ b/docroot/sites/all/modules/contrib/views/includes/analyze.inc @@ -76,8 +76,8 @@ function views_analyze_format_result($view, $messages) { * The 'ok' status should be used to provide information about things * that are acceptable. In general analysis isn't interested in 'ok' * messages, but instead the 'warning', which is a category for items - * that may be broken unless the user knows what he or she is doing, - * and 'error' for items that are definitely broken are much more useful. + * that may be broken unless the user knows what they are doing, and + * 'error' for items that are definitely broken are much more useful. * * @param string $message * The message to report. @@ -105,7 +105,7 @@ function views_ui_views_analyze($view) { } // You can give a page display the same path as an alias existing in the // system, so the alias will not work anymore. Report this to the user, - // because he probably wanted something else. + // because they probably wanted something else. foreach ($view->display as $id => $display) { if (empty($display->handler)) { continue; diff --git a/docroot/sites/all/modules/contrib/views/includes/view.inc b/docroot/sites/all/modules/contrib/views/includes/view.inc index 4541f80b..1704bce4 100644 --- a/docroot/sites/all/modules/contrib/views/includes/view.inc +++ b/docroot/sites/all/modules/contrib/views/includes/view.inc @@ -943,6 +943,10 @@ class view extends views_db_object { $this->base_database = $views_data['table']['base']['database']; } + if (empty($this->display_handler)) { + return FALSE; + } + // Load the options. $query_options = $this->display_handler->get_option('query'); diff --git a/docroot/sites/all/modules/contrib/views/js/ajax_view.js b/docroot/sites/all/modules/contrib/views/js/ajax_view.js index 1d235d3b..98ec5461 100644 --- a/docroot/sites/all/modules/contrib/views/js/ajax_view.js +++ b/docroot/sites/all/modules/contrib/views/js/ajax_view.js @@ -26,6 +26,11 @@ var selector = '.view-dom-id-' + settings.view_dom_id; this.$view = $(selector); + // If view is not present return to prevent errors. + if (!this.$view.length) { + return; + } + // Retrieve the path to use for views' ajax. var ajax_path = Drupal.settings.views.ajax_path; @@ -142,8 +147,11 @@ // than the usual location. $.extend(viewData, Drupal.Views.parseViewArgs(href, this.settings.view_base_path)); - this.element_settings.submit = viewData; - this.pagerAjax = new Drupal.ajax(false, $link, this.element_settings); + // Construct an object using the element settings defaults, + // then overriding submit with viewData. + var pager_settings = $.extend({}, this.element_settings); + pager_settings.submit = viewData; + this.pagerAjax = new Drupal.ajax(false, $link, pager_settings); this.links.push(this.pagerAjax); }; diff --git a/docroot/sites/all/modules/contrib/views/js/views-admin.js b/docroot/sites/all/modules/contrib/views/js/views-admin.js index f3aaf63b..18cfc532 100644 --- a/docroot/sites/all/modules/contrib/views/js/views-admin.js +++ b/docroot/sites/all/modules/contrib/views/js/views-admin.js @@ -254,7 +254,7 @@ Drupal.behaviors.viewsUiRenderAddViewButton.attach = function (context, settings }); // Add a mouseleave handler to close the dropdown when the user mouses // away from the item. We use mouseleave instead of mouseout because - // the user is going to trigger mouseout when she moves from the trigger + // the user is going to trigger mouseout when they move from the trigger // link to the sub menu items. // // We use the 'li.add' selector because the open class on this item will be diff --git a/docroot/sites/all/modules/contrib/views/modules/comment.views_default.inc b/docroot/sites/all/modules/contrib/views/modules/comment.views_default.inc index cee9227f..27ef50c1 100644 --- a/docroot/sites/all/modules/contrib/views/modules/comment.views_default.inc +++ b/docroot/sites/all/modules/contrib/views/modules/comment.views_default.inc @@ -25,6 +25,7 @@ function comment_views_default_views() { $handler = $view->new_display('default', 'Master', 'default'); $handler->display->display_options['title'] = 'Recent comments'; $handler->display->display_options['use_more'] = TRUE; + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'perm'; $handler->display->display_options['access']['perm'] = 'access comments'; $handler->display->display_options['cache']['type'] = 'none'; @@ -44,7 +45,6 @@ function comment_views_default_views() { $handler->display->display_options['fields']['subject']['table'] = 'comment'; $handler->display->display_options['fields']['subject']['field'] = 'subject'; $handler->display->display_options['fields']['subject']['label'] = ''; - $handler->display->display_options['fields']['subject']['link_to_comment'] = 1; /* Field: Comment: Updated date */ $handler->display->display_options['fields']['timestamp']['id'] = 'timestamp'; $handler->display->display_options['fields']['timestamp']['table'] = 'comment'; @@ -56,7 +56,7 @@ function comment_views_default_views() { $handler->display->display_options['sorts']['timestamp']['table'] = 'comment'; $handler->display->display_options['sorts']['timestamp']['field'] = 'changed'; $handler->display->display_options['sorts']['timestamp']['order'] = 'DESC'; - /* Filter criterion: Content: Published or admin */ + /* Filter criterion: Content: Published status or admin user */ $handler->display->display_options['filters']['status_extra']['id'] = 'status_extra'; $handler->display->display_options['filters']['status_extra']['table'] = 'node'; $handler->display->display_options['filters']['status_extra']['field'] = 'status_extra'; @@ -83,7 +83,6 @@ function comment_views_default_views() { $handler->display->display_options['fields']['title']['field'] = 'title'; $handler->display->display_options['fields']['title']['relationship'] = 'nid'; $handler->display->display_options['fields']['title']['label'] = 'Reply to'; - $handler->display->display_options['fields']['title']['link_to_node'] = 1; /* Field: Comment: Updated date */ $handler->display->display_options['fields']['timestamp']['id'] = 'timestamp'; $handler->display->display_options['fields']['timestamp']['table'] = 'comment'; @@ -95,7 +94,6 @@ function comment_views_default_views() { $handler->display->display_options['fields']['subject']['table'] = 'comment'; $handler->display->display_options['fields']['subject']['field'] = 'subject'; $handler->display->display_options['fields']['subject']['label'] = ''; - $handler->display->display_options['fields']['subject']['link_to_comment'] = 1; /* Field: Comment: Comment */ $handler->display->display_options['fields']['comment']['id'] = 'comment'; $handler->display->display_options['fields']['comment']['table'] = 'field_data_comment_body'; @@ -135,8 +133,8 @@ function comment_views_default_views() { /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); $handler->display->display_options['title'] = 'Recent posts'; + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'perm'; - $handler->display->display_options['access']['perm'] = 'access content'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['query']['options']['query_comment'] = FALSE; @@ -182,9 +180,8 @@ function comment_views_default_views() { 'separator' => '', ), ); - $handler->display->display_options['style_options']['override'] = 1; $handler->display->display_options['style_options']['order'] = 'desc'; - /* Relationship: Content: Author */ + /* Relationship: Content: Content author */ $handler->display->display_options['relationships']['uid']['id'] = 'uid'; $handler->display->display_options['relationships']['uid']['table'] = 'node'; $handler->display->display_options['relationships']['uid']['field'] = 'uid'; @@ -217,8 +214,7 @@ function comment_views_default_views() { $handler->display->display_options['fields']['timestamp']['table'] = 'history'; $handler->display->display_options['fields']['timestamp']['field'] = 'timestamp'; $handler->display->display_options['fields']['timestamp']['label'] = ''; - $handler->display->display_options['fields']['timestamp']['link_to_node'] = 0; - $handler->display->display_options['fields']['timestamp']['comments'] = 1; + $handler->display->display_options['fields']['timestamp']['comments'] = TRUE; /* Field: Content: New comments */ $handler->display->display_options['fields']['new_comments']['id'] = 'new_comments'; $handler->display->display_options['fields']['new_comments']['table'] = 'node'; @@ -226,7 +222,6 @@ function comment_views_default_views() { $handler->display->display_options['fields']['new_comments']['label'] = ''; $handler->display->display_options['fields']['new_comments']['hide_empty'] = TRUE; $handler->display->display_options['fields']['new_comments']['suffix'] = ' new'; - $handler->display->display_options['fields']['new_comments']['link_to_comment'] = 1; /* Sort criterion: Content: Last comment time */ $handler->display->display_options['sorts']['last_comment_timestamp']['id'] = 'last_comment_timestamp'; $handler->display->display_options['sorts']['last_comment_timestamp']['table'] = 'node_comment_statistics'; @@ -235,13 +230,13 @@ function comment_views_default_views() { $handler->display->display_options['arguments']['uid_touch']['id'] = 'uid_touch'; $handler->display->display_options['arguments']['uid_touch']['table'] = 'node'; $handler->display->display_options['arguments']['uid_touch']['field'] = 'uid_touch'; - $handler->display->display_options['arguments']['uid_touch']['exception']['title_enable'] = 1; - $handler->display->display_options['arguments']['uid_touch']['title_enable'] = 1; + $handler->display->display_options['arguments']['uid_touch']['exception']['title_enable'] = TRUE; + $handler->display->display_options['arguments']['uid_touch']['title_enable'] = TRUE; $handler->display->display_options['arguments']['uid_touch']['title'] = 'Recent posts for %1'; $handler->display->display_options['arguments']['uid_touch']['default_argument_type'] = 'fixed'; $handler->display->display_options['arguments']['uid_touch']['summary']['format'] = 'default_summary'; - $handler->display->display_options['arguments']['uid_touch']['specify_validation'] = 1; - /* Filter criterion: Content: Published */ + $handler->display->display_options['arguments']['uid_touch']['specify_validation'] = TRUE; + /* Filter criterion: Content: Published status */ $handler->display->display_options['filters']['status']['id'] = 'status'; $handler->display->display_options['filters']['status']['table'] = 'node'; $handler->display->display_options['filters']['status']['field'] = 'status'; diff --git a/docroot/sites/all/modules/contrib/views/modules/field.views.inc b/docroot/sites/all/modules/contrib/views/modules/field.views.inc index 9f193741..af33a780 100644 --- a/docroot/sites/all/modules/contrib/views/modules/field.views.inc +++ b/docroot/sites/all/modules/contrib/views/modules/field.views.inc @@ -120,6 +120,14 @@ function field_views_field_default_views_data($field) { // Build the relationships between the field table and the entity tables. foreach ($field['bundles'] as $entity => $bundles) { $entity_info = entity_get_info($entity); + if (empty($entity_info)) { + watchdog('views', + 'Field %field_name refers to nonexistent entity type %type. You might want to remove this broken field instance. See documentation.', + array('%field_name' => $field['field_name'], '%type' => $entity), + WATCHDOG_WARNING + ); + continue; + } $groups[$entity] = $entity_info['label']; // Override Node to Content. diff --git a/docroot/sites/all/modules/contrib/views/modules/node.views_default.inc b/docroot/sites/all/modules/contrib/views/modules/node.views_default.inc index b46b52cf..bbb7f669 100644 --- a/docroot/sites/all/modules/contrib/views/modules/node.views_default.inc +++ b/docroot/sites/all/modules/contrib/views/modules/node.views_default.inc @@ -24,8 +24,8 @@ function node_views_default_views() { /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); $handler->display->display_options['title'] = 'Monthly archive'; + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'perm'; - $handler->display->display_options['access']['perm'] = 'access content'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['query']['options']['query_comment'] = FALSE; @@ -43,16 +43,16 @@ function node_views_default_views() { $handler->display->display_options['arguments']['created_year_month']['table'] = 'node'; $handler->display->display_options['arguments']['created_year_month']['field'] = 'created_year_month'; $handler->display->display_options['arguments']['created_year_month']['default_action'] = 'summary'; - $handler->display->display_options['arguments']['created_year_month']['exception']['title_enable'] = 1; - $handler->display->display_options['arguments']['created_year_month']['title_enable'] = 1; + $handler->display->display_options['arguments']['created_year_month']['exception']['title_enable'] = TRUE; + $handler->display->display_options['arguments']['created_year_month']['title_enable'] = TRUE; $handler->display->display_options['arguments']['created_year_month']['title'] = '%1'; $handler->display->display_options['arguments']['created_year_month']['default_argument_type'] = 'fixed'; $handler->display->display_options['arguments']['created_year_month']['summary']['sort_order'] = 'desc'; $handler->display->display_options['arguments']['created_year_month']['summary']['format'] = 'default_summary'; $handler->display->display_options['arguments']['created_year_month']['summary_options']['override'] = TRUE; $handler->display->display_options['arguments']['created_year_month']['summary_options']['items_per_page'] = '30'; - $handler->display->display_options['arguments']['created_year_month']['specify_validation'] = 1; - /* Filter criterion: Content: Published */ + $handler->display->display_options['arguments']['created_year_month']['specify_validation'] = TRUE; + /* Filter criterion: Content: Published status */ $handler->display->display_options['filters']['status']['id'] = 'status'; $handler->display->display_options['filters']['status']['table'] = 'node'; $handler->display->display_options['filters']['status']['field'] = 'status'; @@ -72,13 +72,13 @@ function node_views_default_views() { $handler->display->display_options['arguments']['created_year_month']['table'] = 'node'; $handler->display->display_options['arguments']['created_year_month']['field'] = 'created_year_month'; $handler->display->display_options['arguments']['created_year_month']['default_action'] = 'summary'; - $handler->display->display_options['arguments']['created_year_month']['exception']['title_enable'] = 1; - $handler->display->display_options['arguments']['created_year_month']['title_enable'] = 1; + $handler->display->display_options['arguments']['created_year_month']['exception']['title_enable'] = TRUE; + $handler->display->display_options['arguments']['created_year_month']['title_enable'] = TRUE; $handler->display->display_options['arguments']['created_year_month']['title'] = '%1'; $handler->display->display_options['arguments']['created_year_month']['default_argument_type'] = 'fixed'; $handler->display->display_options['arguments']['created_year_month']['summary']['format'] = 'default_summary'; $handler->display->display_options['arguments']['created_year_month']['summary_options']['items_per_page'] = '30'; - $handler->display->display_options['arguments']['created_year_month']['specify_validation'] = 1; + $handler->display->display_options['arguments']['created_year_month']['specify_validation'] = TRUE; $translatables['archive'] = array( t('Master'), t('Monthly archive'), @@ -111,8 +111,8 @@ function node_views_default_views() { /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'perm'; - $handler->display->display_options['access']['perm'] = 'access content'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['query']['options']['query_comment'] = FALSE; @@ -120,8 +120,7 @@ function node_views_default_views() { $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'node'; - $handler->display->display_options['row_options']['links'] = 1; - /* Sort criterion: Content: Sticky */ + /* Sort criterion: Content: Sticky status */ $handler->display->display_options['sorts']['sticky']['id'] = 'sticky'; $handler->display->display_options['sorts']['sticky']['table'] = 'node'; $handler->display->display_options['sorts']['sticky']['field'] = 'sticky'; @@ -131,14 +130,14 @@ function node_views_default_views() { $handler->display->display_options['sorts']['created']['table'] = 'node'; $handler->display->display_options['sorts']['created']['field'] = 'created'; $handler->display->display_options['sorts']['created']['order'] = 'DESC'; - /* Filter criterion: Content: Promoted to front page */ + /* Filter criterion: Content: Promoted to front page status */ $handler->display->display_options['filters']['promote']['id'] = 'promote'; $handler->display->display_options['filters']['promote']['table'] = 'node'; $handler->display->display_options['filters']['promote']['field'] = 'promote'; $handler->display->display_options['filters']['promote']['value'] = '1'; $handler->display->display_options['filters']['promote']['group'] = 0; $handler->display->display_options['filters']['promote']['expose']['operator'] = FALSE; - /* Filter criterion: Content: Published */ + /* Filter criterion: Content: Published status */ $handler->display->display_options['filters']['status']['id'] = 'status'; $handler->display->display_options['filters']['status']['table'] = 'node'; $handler->display->display_options['filters']['status']['field'] = 'status'; @@ -194,8 +193,8 @@ function node_views_default_views() { /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); $handler->display->display_options['use_ajax'] = TRUE; + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'perm'; - $handler->display->display_options['access']['perm'] = 'access content'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['query']['options']['query_comment'] = FALSE; @@ -223,19 +222,20 @@ function node_views_default_views() { 'separator' => '', ), ); - $handler->display->display_options['style_options']['override'] = 1; - $handler->display->display_options['style_options']['sticky'] = 0; + /* Relationship: Content: Content author */ + $handler->display->display_options['relationships']['uid']['id'] = 'uid'; + $handler->display->display_options['relationships']['uid']['table'] = 'node'; + $handler->display->display_options['relationships']['uid']['field'] = 'uid'; /* Field: Content: Title */ $handler->display->display_options['fields']['title']['id'] = 'title'; $handler->display->display_options['fields']['title']['table'] = 'node'; $handler->display->display_options['fields']['title']['field'] = 'title'; - $handler->display->display_options['fields']['title']['link_to_node'] = 1; /* Field: User: Name */ $handler->display->display_options['fields']['name']['id'] = 'name'; $handler->display->display_options['fields']['name']['table'] = 'users'; $handler->display->display_options['fields']['name']['field'] = 'name'; + $handler->display->display_options['fields']['name']['relationship'] = 'uid'; $handler->display->display_options['fields']['name']['label'] = 'Author'; - $handler->display->display_options['fields']['name']['link_to_user'] = 1; /* Field: Content: Updated date */ $handler->display->display_options['fields']['changed']['id'] = 'changed'; $handler->display->display_options['fields']['changed']['table'] = 'node'; @@ -247,16 +247,20 @@ function node_views_default_views() { $handler->display->display_options['arguments']['title']['table'] = 'node'; $handler->display->display_options['arguments']['title']['field'] = 'title'; $handler->display->display_options['arguments']['title']['default_action'] = 'default'; - $handler->display->display_options['arguments']['title']['exception']['title_enable'] = 1; + $handler->display->display_options['arguments']['title']['exception']['title_enable'] = TRUE; $handler->display->display_options['arguments']['title']['default_argument_type'] = 'fixed'; $handler->display->display_options['arguments']['title']['default_argument_options']['argument'] = 'a'; $handler->display->display_options['arguments']['title']['summary']['format'] = 'default_summary'; - $handler->display->display_options['arguments']['title']['specify_validation'] = 1; - $handler->display->display_options['arguments']['title']['glossary'] = 1; + $handler->display->display_options['arguments']['title']['specify_validation'] = TRUE; + $handler->display->display_options['arguments']['title']['glossary'] = TRUE; $handler->display->display_options['arguments']['title']['limit'] = '1'; $handler->display->display_options['arguments']['title']['case'] = 'upper'; $handler->display->display_options['arguments']['title']['path_case'] = 'lower'; - $handler->display->display_options['arguments']['title']['transform_dash'] = 0; + /* Filter criterion: Content: Published status */ + $handler->display->display_options['filters']['status']['id'] = 'status'; + $handler->display->display_options['filters']['status']['table'] = 'node'; + $handler->display->display_options['filters']['status']['field'] = 'status'; + $handler->display->display_options['filters']['status']['value'] = '1'; /* Display: Page */ $handler = $view->new_display('page', 'Page', 'page'); @@ -275,24 +279,23 @@ function node_views_default_views() { $handler->display->display_options['arguments']['title']['table'] = 'node'; $handler->display->display_options['arguments']['title']['field'] = 'title'; $handler->display->display_options['arguments']['title']['default_action'] = 'summary'; - $handler->display->display_options['arguments']['title']['exception']['title_enable'] = 1; + $handler->display->display_options['arguments']['title']['exception']['title_enable'] = TRUE; $handler->display->display_options['arguments']['title']['default_argument_type'] = 'fixed'; $handler->display->display_options['arguments']['title']['default_argument_options']['argument'] = 'a'; $handler->display->display_options['arguments']['title']['summary']['format'] = 'unformatted_summary'; $handler->display->display_options['arguments']['title']['summary_options']['items_per_page'] = '25'; - $handler->display->display_options['arguments']['title']['summary_options']['inline'] = 1; + $handler->display->display_options['arguments']['title']['summary_options']['inline'] = TRUE; $handler->display->display_options['arguments']['title']['summary_options']['separator'] = ' | '; - $handler->display->display_options['arguments']['title']['specify_validation'] = 1; - $handler->display->display_options['arguments']['title']['glossary'] = 1; + $handler->display->display_options['arguments']['title']['specify_validation'] = TRUE; + $handler->display->display_options['arguments']['title']['glossary'] = TRUE; $handler->display->display_options['arguments']['title']['limit'] = '1'; $handler->display->display_options['arguments']['title']['case'] = 'upper'; $handler->display->display_options['arguments']['title']['path_case'] = 'lower'; - $handler->display->display_options['arguments']['title']['transform_dash'] = 0; $handler->display->display_options['displays'] = array( 'default' => 'default', 'page' => 'page', ); - $handler->display->display_options['inherit_arguments'] = 0; + $handler->display->display_options['inherit_arguments'] = FALSE; $translatables['glossary'] = array( t('Master'), t('more'), diff --git a/docroot/sites/all/modules/contrib/views/modules/node/views_handler_field_node_type.inc b/docroot/sites/all/modules/contrib/views/modules/node/views_handler_field_node_type.inc index e644649b..03442dad 100644 --- a/docroot/sites/all/modules/contrib/views/modules/node/views_handler_field_node_type.inc +++ b/docroot/sites/all/modules/contrib/views/modules/node/views_handler_field_node_type.inc @@ -23,7 +23,7 @@ class views_handler_field_node_type extends views_handler_field_node { } /** - * Provide machine_name option for to node type display. + * Provide machine_name option for the node type display. */ public function options_form(&$form, &$form_state) { parent::options_form($form, $form_state); diff --git a/docroot/sites/all/modules/contrib/views/modules/search.views_default.inc b/docroot/sites/all/modules/contrib/views/modules/search.views_default.inc index bfd96b8d..5cc3324c 100644 --- a/docroot/sites/all/modules/contrib/views/modules/search.views_default.inc +++ b/docroot/sites/all/modules/contrib/views/modules/search.views_default.inc @@ -23,8 +23,8 @@ function search_views_default_views() { /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'perm'; - $handler->display->display_options['access']['perm'] = 'access content'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['query']['options']['query_comment'] = FALSE; @@ -34,31 +34,28 @@ function search_views_default_views() { $handler->display->display_options['style_plugin'] = 'list'; $handler->display->display_options['style_options']['type'] = 'ol'; $handler->display->display_options['row_plugin'] = 'fields'; - /* No results behavior: Global: Text area */ - $handler->display->display_options['empty']['text']['id'] = 'area'; - $handler->display->display_options['empty']['text']['table'] = 'views'; - $handler->display->display_options['empty']['text']['field'] = 'area'; - $handler->display->display_options['empty']['text']['empty'] = FALSE; - $handler->display->display_options['empty']['text']['content'] = 'No backlinks found.'; - $handler->display->display_options['empty']['text']['format'] = '1'; + /* No results behavior: Global: Unfiltered text */ + $handler->display->display_options['empty']['area_text_custom']['id'] = 'area_text_custom'; + $handler->display->display_options['empty']['area_text_custom']['table'] = 'views'; + $handler->display->display_options['empty']['area_text_custom']['field'] = 'area_text_custom'; + $handler->display->display_options['empty']['area_text_custom']['content'] = 'No backlinks found.'; /* Field: Content: Title */ $handler->display->display_options['fields']['title']['id'] = 'title'; $handler->display->display_options['fields']['title']['table'] = 'node'; $handler->display->display_options['fields']['title']['field'] = 'title'; $handler->display->display_options['fields']['title']['label'] = ''; - $handler->display->display_options['fields']['title']['link_to_node'] = 1; /* Contextual filter: Search: Links to */ $handler->display->display_options['arguments']['nid']['id'] = 'nid'; $handler->display->display_options['arguments']['nid']['table'] = 'search_node_links_to'; $handler->display->display_options['arguments']['nid']['field'] = 'nid'; $handler->display->display_options['arguments']['nid']['default_action'] = 'not found'; - $handler->display->display_options['arguments']['nid']['title_enable'] = 1; + $handler->display->display_options['arguments']['nid']['title_enable'] = TRUE; $handler->display->display_options['arguments']['nid']['title'] = 'Pages that link to %1'; $handler->display->display_options['arguments']['nid']['default_argument_type'] = 'fixed'; $handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary'; - $handler->display->display_options['arguments']['nid']['specify_validation'] = 1; + $handler->display->display_options['arguments']['nid']['specify_validation'] = TRUE; $handler->display->display_options['arguments']['nid']['validate']['type'] = 'node'; - /* Filter criterion: Content: Published */ + /* Filter criterion: Content: Published status */ $handler->display->display_options['filters']['status']['id'] = 'status'; $handler->display->display_options['filters']['status']['table'] = 'node'; $handler->display->display_options['filters']['status']['field'] = 'status'; @@ -89,11 +86,11 @@ function search_views_default_views() { $handler->display->display_options['arguments']['nid']['table'] = 'search_node_links_to'; $handler->display->display_options['arguments']['nid']['field'] = 'nid'; $handler->display->display_options['arguments']['nid']['default_action'] = 'default'; - $handler->display->display_options['arguments']['nid']['title_enable'] = 1; + $handler->display->display_options['arguments']['nid']['title_enable'] = TRUE; $handler->display->display_options['arguments']['nid']['title'] = 'What links here'; $handler->display->display_options['arguments']['nid']['default_argument_type'] = 'node'; $handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary'; - $handler->display->display_options['arguments']['nid']['specify_validation'] = 1; + $handler->display->display_options['arguments']['nid']['specify_validation'] = TRUE; $handler->display->display_options['arguments']['nid']['validate']['type'] = 'node'; $translatables['backlinks'] = array( t('Master'), diff --git a/docroot/sites/all/modules/contrib/views/modules/statistics.views_default.inc b/docroot/sites/all/modules/contrib/views/modules/statistics.views_default.inc index 704e033d..19c63a84 100644 --- a/docroot/sites/all/modules/contrib/views/modules/statistics.views_default.inc +++ b/docroot/sites/all/modules/contrib/views/modules/statistics.views_default.inc @@ -25,8 +25,8 @@ function statistics_views_default_views() { $handler = $view->new_display('default', 'Master', 'default'); $handler->display->display_options['title'] = 'Popular content'; $handler->display->display_options['use_more'] = TRUE; + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'perm'; - $handler->display->display_options['access']['perm'] = 'access content'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['query']['options']['query_comment'] = FALSE; @@ -63,7 +63,7 @@ function statistics_views_default_views() { 'separator' => '', ), ); - $handler->display->display_options['style_options']['override'] = 0; + $handler->display->display_options['style_options']['override'] = FALSE; $handler->display->display_options['style_options']['order'] = 'desc'; /* Field: Content: Type */ $handler->display->display_options['fields']['type']['id'] = 'type'; @@ -83,14 +83,13 @@ function statistics_views_default_views() { $handler->display->display_options['fields']['timestamp']['table'] = 'history'; $handler->display->display_options['fields']['timestamp']['field'] = 'timestamp'; $handler->display->display_options['fields']['timestamp']['label'] = ''; - $handler->display->display_options['fields']['timestamp']['link_to_node'] = 0; - $handler->display->display_options['fields']['timestamp']['comments'] = 1; + $handler->display->display_options['fields']['timestamp']['comments'] = TRUE; /* Sort criterion: Content statistics: Total views */ $handler->display->display_options['sorts']['totalcount']['id'] = 'totalcount'; $handler->display->display_options['sorts']['totalcount']['table'] = 'node_counter'; $handler->display->display_options['sorts']['totalcount']['field'] = 'totalcount'; $handler->display->display_options['sorts']['totalcount']['order'] = 'DESC'; - /* Filter criterion: Content: Published */ + /* Filter criterion: Content: Published status */ $handler->display->display_options['filters']['status']['id'] = 'status'; $handler->display->display_options['filters']['status']['table'] = 'node'; $handler->display->display_options['filters']['status']['field'] = 'status'; @@ -137,8 +136,7 @@ function statistics_views_default_views() { $handler->display->display_options['fields']['timestamp']['table'] = 'history'; $handler->display->display_options['fields']['timestamp']['field'] = 'timestamp'; $handler->display->display_options['fields']['timestamp']['label'] = ''; - $handler->display->display_options['fields']['timestamp']['link_to_node'] = 0; - $handler->display->display_options['fields']['timestamp']['comments'] = 1; + $handler->display->display_options['fields']['timestamp']['comments'] = TRUE; /* Field: Content statistics: Views today */ $handler->display->display_options['fields']['daycount']['id'] = 'daycount'; $handler->display->display_options['fields']['daycount']['table'] = 'node_counter'; @@ -175,7 +173,6 @@ function statistics_views_default_views() { $handler->display->display_options['fields']['title']['table'] = 'node'; $handler->display->display_options['fields']['title']['field'] = 'title'; $handler->display->display_options['fields']['title']['label'] = ''; - $handler->display->display_options['fields']['title']['link_to_node'] = 1; /* Field: Content statistics: Total views */ $handler->display->display_options['fields']['totalcount']['id'] = 'totalcount'; $handler->display->display_options['fields']['totalcount']['table'] = 'node_counter'; @@ -206,7 +203,6 @@ function statistics_views_default_views() { $handler->display->display_options['fields']['title']['table'] = 'node'; $handler->display->display_options['fields']['title']['field'] = 'title'; $handler->display->display_options['fields']['title']['label'] = ''; - $handler->display->display_options['fields']['title']['link_to_node'] = 1; /* Field: Content statistics: Views today */ $handler->display->display_options['fields']['daycount']['id'] = 'daycount'; $handler->display->display_options['fields']['daycount']['table'] = 'node_counter'; diff --git a/docroot/sites/all/modules/contrib/views/modules/taxonomy.views_default.inc b/docroot/sites/all/modules/contrib/views/modules/taxonomy.views_default.inc index bb6a079b..d59ea421 100644 --- a/docroot/sites/all/modules/contrib/views/modules/taxonomy.views_default.inc +++ b/docroot/sites/all/modules/contrib/views/modules/taxonomy.views_default.inc @@ -23,8 +23,8 @@ function taxonomy_views_default_views() { /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'perm'; - $handler->display->display_options['access']['perm'] = 'access content'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['query']['options']['query_comment'] = FALSE; @@ -32,7 +32,7 @@ function taxonomy_views_default_views() { $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'node'; - /* Sort criterion: Content: Sticky */ + /* Sort criterion: Content: Sticky status */ $handler->display->display_options['sorts']['sticky']['id'] = 'sticky'; $handler->display->display_options['sorts']['sticky']['table'] = 'node'; $handler->display->display_options['sorts']['sticky']['field'] = 'sticky'; @@ -47,24 +47,24 @@ function taxonomy_views_default_views() { $handler->display->display_options['arguments']['term_node_tid_depth']['table'] = 'node'; $handler->display->display_options['arguments']['term_node_tid_depth']['field'] = 'term_node_tid_depth'; $handler->display->display_options['arguments']['term_node_tid_depth']['default_action'] = 'not found'; - $handler->display->display_options['arguments']['term_node_tid_depth']['exception']['title_enable'] = 1; - $handler->display->display_options['arguments']['term_node_tid_depth']['title_enable'] = 1; + $handler->display->display_options['arguments']['term_node_tid_depth']['exception']['title_enable'] = TRUE; + $handler->display->display_options['arguments']['term_node_tid_depth']['title_enable'] = TRUE; $handler->display->display_options['arguments']['term_node_tid_depth']['title'] = '%1'; $handler->display->display_options['arguments']['term_node_tid_depth']['default_argument_type'] = 'fixed'; $handler->display->display_options['arguments']['term_node_tid_depth']['summary']['format'] = 'default_summary'; - $handler->display->display_options['arguments']['term_node_tid_depth']['specify_validation'] = 1; + $handler->display->display_options['arguments']['term_node_tid_depth']['specify_validation'] = TRUE; $handler->display->display_options['arguments']['term_node_tid_depth']['validate']['type'] = 'taxonomy_term'; $handler->display->display_options['arguments']['term_node_tid_depth']['depth'] = '0'; - $handler->display->display_options['arguments']['term_node_tid_depth']['break_phrase'] = 1; + $handler->display->display_options['arguments']['term_node_tid_depth']['break_phrase'] = TRUE; /* Contextual filter: Content: Has taxonomy term ID depth modifier */ $handler->display->display_options['arguments']['term_node_tid_depth_modifier']['id'] = 'term_node_tid_depth_modifier'; $handler->display->display_options['arguments']['term_node_tid_depth_modifier']['table'] = 'node'; $handler->display->display_options['arguments']['term_node_tid_depth_modifier']['field'] = 'term_node_tid_depth_modifier'; - $handler->display->display_options['arguments']['term_node_tid_depth_modifier']['exception']['title_enable'] = 1; + $handler->display->display_options['arguments']['term_node_tid_depth_modifier']['exception']['title_enable'] = TRUE; $handler->display->display_options['arguments']['term_node_tid_depth_modifier']['default_argument_type'] = 'fixed'; $handler->display->display_options['arguments']['term_node_tid_depth_modifier']['summary']['format'] = 'default_summary'; - $handler->display->display_options['arguments']['term_node_tid_depth_modifier']['specify_validation'] = 1; - /* Filter criterion: Content: Published or admin */ + $handler->display->display_options['arguments']['term_node_tid_depth_modifier']['specify_validation'] = TRUE; + /* Filter criterion: Content: Published status or admin user */ $handler->display->display_options['filters']['status_extra']['id'] = 'status_extra'; $handler->display->display_options['filters']['status_extra']['table'] = 'node'; $handler->display->display_options['filters']['status_extra']['field'] = 'status_extra'; diff --git a/docroot/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_name.inc b/docroot/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_name.inc index fa409893..d89f461c 100644 --- a/docroot/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_name.inc +++ b/docroot/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_name.inc @@ -107,6 +107,7 @@ class views_handler_filter_user_name extends views_handler_filter_in_operator { $uids = FALSE; } + $this->validated_exposed_input = array(); if ($uids) { $this->validated_exposed_input = $uids; } diff --git a/docroot/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_permissions.inc b/docroot/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_permissions.inc index ee638181..c28fffb1 100644 --- a/docroot/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_permissions.inc +++ b/docroot/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_permissions.inc @@ -31,7 +31,7 @@ class views_handler_filter_user_permissions extends views_handler_filter_many_to if ($permissions = module_invoke($module, 'permission')) { foreach ($permissions as $perm => $perm_item) { // @todo group by module but views_handler_filter_many_to_one does not support this. - $this->value_options[$perm] = check_plain(strip_tags($perm_item['title'])); + $this->value_options[$perm] = strip_tags($perm_item['title']); } } } diff --git a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_cache.inc b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_cache.inc index 80eb8314..e4b29be6 100644 --- a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_cache.inc +++ b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_cache.inc @@ -198,17 +198,12 @@ class views_plugin_cache extends views_plugin { * Gather out of band data, compare it to the start data and store the diff. */ public function gather_headers() { - // Simple replacement for head. - if (isset($this->storage['head'])) { - $this->storage['head'] = str_replace($this->storage['head'], '', drupal_add_html_head()); - } - else { - $this->storage['head'] = ''; - } - // Check if the advanced mapping function of D 7.23 is available. $array_mapping_func = function_exists('drupal_array_diff_assoc_recursive') ? 'drupal_array_diff_assoc_recursive' : 'array_diff_assoc'; + // Get difference for head. + $this->storage['head'] = $array_mapping_func(drupal_add_html_head(), $this->storage['head']); + // Slightly less simple for CSS. $css = drupal_add_css(); $css_start = isset($this->storage['css']) ? $this->storage['css'] : array(); @@ -267,7 +262,9 @@ class views_plugin_cache extends views_plugin { */ public function restore_headers() { if (!empty($this->storage['head'])) { - drupal_add_html_head($this->storage['head']); + foreach ($this->storage['head'] as $key => $data) { + drupal_add_html_head($data, $key); + } } if (!empty($this->storage['css'])) { foreach ($this->storage['css'] as $args) { @@ -345,6 +342,7 @@ class views_plugin_cache extends views_plugin { 'language' => $GLOBALS['language']->language, 'language_content' => $GLOBALS['language_content']->language, 'base_url' => $GLOBALS['base_url'], + 'display_options' => $this->display->display_options, ); if (empty($key_data['build_info'])) { diff --git a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_display.inc b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_display.inc index 3d47a14a..250c9678 100644 --- a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_display.inc +++ b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_display.inc @@ -872,14 +872,14 @@ class views_plugin_display extends views_plugin { return $this->get_option('path'); } + if ($this->get_option('link_display') == 'custom_url' && $link_url = $this->get_option('link_url')) { + return $link_url; + } + $display_id = $this->get_link_display(); if ($display_id && !empty($this->view->display[$display_id]) && is_object($this->view->display[$display_id]->handler)) { return $this->view->display[$display_id]->handler->get_path(); } - - if ($this->get_option('link_display') == 'custom_url' && $link_url = $this->get_option('link_url')) { - return $link_url; - } } /** @@ -1558,6 +1558,7 @@ class views_plugin_display extends views_plugin { '#type' => 'textfield', '#description' => t('This name will appear only in the administrative interface for the View.'), '#default_value' => $this->display->display_title, + '#maxlength' => 64, ); $form['display_description'] = array( '#title' => t('Description'), diff --git a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form.inc b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form.inc index 5493be36..157bde99 100644 --- a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form.inc +++ b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form.inc @@ -167,13 +167,12 @@ class views_plugin_exposed_form extends views_plugin { $form_state['exposed_form_plugin'] = $this; $form = drupal_build_form('views_exposed_form', $form_state); - $output = drupal_render($form); if (!$this->view->display_handler->displays_exposed() || (!$block && $this->view->display_handler->get_option('exposed_block'))) { return ""; } else { - return $output; + return drupal_render($form); } } @@ -276,7 +275,7 @@ class views_plugin_exposed_form extends views_plugin { $form['sort_order'] = array( '#type' => 'select', '#options' => $sort_order, - '#title' => t('Order'), + '#title' => t('Order', array(), array('context' => 'Sort order')), '#default_value' => $default_sort_order, ); } diff --git a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc index db3e7e27..e05eba92 100644 --- a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc +++ b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc @@ -120,7 +120,7 @@ class views_plugin_query_default extends views_plugin_query { /** * {@inheritdoc} */ - public function init($base_table = 'node', $base_field = 'nid', $options) { + public function init($base_table = 'node', $base_field = 'nid', $options = array()) { parent::init($base_table, $base_field, $options); $this->base_table = $base_table; // Predefine these above, for clarity. @@ -283,9 +283,9 @@ class views_plugin_query_default extends views_plugin_query { ); $form['slave'] = array( '#type' => 'checkbox', - '#title' => t('Use Slave Server'), - '#description' => t('This will make the query attempt to connect to a slave server if available. If no slave server is defined or available, it will fall back to the default server.'), '#default_value' => !empty($this->options['slave']), + '#title' => t('Use Replica Server'), + '#description' => t('This will make the query attempt to connect to a replica server if available. If no replica server is defined or available, it will fall back to the default server.'), ); $form['query_comment'] = array( '#type' => 'textfield', @@ -1318,9 +1318,9 @@ class views_plugin_query_default extends views_plugin_query { $key = $this->view->base_database; } - // Set the slave target if the slave option is set. if (!empty($this->options['slave'])) { $target = 'slave'; + // Set the replica target if the replica option is set. } // Go ahead and build the query. db_select doesn't support to specify the @@ -1646,7 +1646,7 @@ class views_plugin_query_default extends views_plugin_query { if (!empty($relationship)) { foreach ($this->view->relationship as $current) { - if ($current->alias == $relationship) { + if (isset($current->alias) && $current->alias == $relationship) { $base_table = $current->definition['base']; $base_table_alias = $relationship; break; diff --git a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_style_jump_menu.inc b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_style_jump_menu.inc index 418766b1..f997d2b2 100644 --- a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_style_jump_menu.inc +++ b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_style_jump_menu.inc @@ -78,7 +78,7 @@ class views_plugin_style_jump_menu extends views_plugin_style { '#type' => 'textfield', '#title' => t('Selector label'), '#default_value' => $this->options['label'], - '#description' => t('The text that will appear as the the label of the selector element. If blank no label tag will be used.'), + '#description' => t('The text that will appear as the label of the selector element. If blank no label tag will be used.'), ); $form['choose'] = array( diff --git a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_style_summary_jump_menu.inc b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_style_summary_jump_menu.inc index ee75f24e..f58857b8 100644 --- a/docroot/sites/all/modules/contrib/views/plugins/views_plugin_style_summary_jump_menu.inc +++ b/docroot/sites/all/modules/contrib/views/plugins/views_plugin_style_summary_jump_menu.inc @@ -79,7 +79,7 @@ class views_plugin_style_summary_jump_menu extends views_plugin_style { '#type' => 'textfield', '#title' => t('Selector label'), '#default_value' => $this->options['label'], - '#description' => t('The text that will appear as the the label of the selector element. If blank no label tag will be used.'), + '#description' => t('The text that will appear as the label of the selector element. If blank no label tag will be used.'), ); $form['choose'] = array( diff --git a/docroot/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_base_views_wizard.class.php b/docroot/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_base_views_wizard.class.php index 35989c4b..a5609159 100644 --- a/docroot/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_base_views_wizard.class.php +++ b/docroot/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_base_views_wizard.class.php @@ -394,7 +394,7 @@ protected function build_filters(&$form, &$form_state) { // with that bundle. Otherwise, we use all bundles. $bundles = array_keys($entity_info['bundles']); // Double check that this is a real bundle before using it (since above - // we added a dummy option 'all' to the bundle list on the form). + // we added a placeholder option 'all' to the bundle list on the form). if (isset($selected_bundle) && in_array($selected_bundle, $bundles)) { $bundles = array($selected_bundle); } diff --git a/docroot/sites/all/modules/contrib/views/tests/comment/views_handler_argument_comment_user_uid.test b/docroot/sites/all/modules/contrib/views/tests/comment/views_handler_argument_comment_user_uid.test index 9564450d..f6cc2965 100644 --- a/docroot/sites/all/modules/contrib/views/tests/comment/views_handler_argument_comment_user_uid.test +++ b/docroot/sites/all/modules/contrib/views/tests/comment/views_handler_argument_comment_user_uid.test @@ -9,6 +9,7 @@ * Tests the argument_comment_user_uid handler. */ class viewsHandlerArgumentCommentUserUidTest extends ViewsSqlTest { + public static function getInfo() { return array( 'name' => 'Tests handler argument_comment_user_uid', @@ -29,8 +30,10 @@ class viewsHandlerArgumentCommentUserUidTest extends ViewsSqlTest { $comment += array( 'uid' => $this->loggedInUser->uid, 'nid' => $node->nid, - 'cid' => '', - 'pid' => '', + 'cid' => NULL, + // To indicate that a comment does not have a parent comment use the value + // zero instead of an empty string. + 'pid' => 0, ); return comment_save((object) $comment); } diff --git a/docroot/sites/all/modules/contrib/views/tests/field/views_fieldapi.test b/docroot/sites/all/modules/contrib/views/tests/field/views_fieldapi.test index 4ac71bc8..6c4afd20 100644 --- a/docroot/sites/all/modules/contrib/views/tests/field/views_fieldapi.test +++ b/docroot/sites/all/modules/contrib/views/tests/field/views_fieldapi.test @@ -375,6 +375,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper { for ($i = 0; $i < 3; $i++) { $rendered_field = $view->style_plugin->get_field($i, $this->fields[3]['field_name']); + $this->assertNotNull($rendered_field); $items = array(); $pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NONE]; $pure_items = array_splice($pure_items, 0, 3); @@ -397,6 +398,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper { for ($i = 0; $i < 3; $i++) { $rendered_field = $view->style_plugin->get_field($i, $this->fields[3]['field_name']); + $this->assertNotNull($rendered_field); $items = array(); $pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NONE]; $pure_items = array_splice($pure_items, 1, 3); @@ -416,6 +418,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper { for ($i = 0; $i < 3; $i++) { $rendered_field = $view->style_plugin->get_field($i, $this->fields[3]['field_name']); + $this->assertNotNull($rendered_field); $items = array(); $pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NONE]; array_splice($pure_items, 0, -3); @@ -429,13 +432,14 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper { // Test delta first last. $view->display['default']->display_options['fields'][$this->fields[3]['field_name']]['group_rows'] = TRUE; - $view->display['default']->display_options['fields'][$this->fields[3]['field_name']]['delta_limit'] = 0; + $view->display['default']->display_options['fields'][$this->fields[3]['field_name']]['delta_limit'] = 'all'; $view->display['default']->display_options['fields'][$this->fields[3]['field_name']]['delta_first_last'] = TRUE; $view->display['default']->display_options['fields'][$this->fields[3]['field_name']]['delta_reversed'] = FALSE; $this->executeView($view); for ($i = 0; $i < 3; $i++) { $rendered_field = $view->style_plugin->get_field($i, $this->fields[3]['field_name']); + $this->assertNotNull($rendered_field); $items = array(); $pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NONE]; $items[] = $pure_items[0]['value']; @@ -453,6 +457,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper { for ($i = 0; $i < 3; $i++) { $rendered_field = $view->style_plugin->get_field($i, $this->fields[3]['field_name']); + $this->assertNotNull($rendered_field); $items = array(); $pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NONE]; $pure_items = array_splice($pure_items, 0, 3); diff --git a/docroot/sites/all/modules/contrib/views/tests/views_glossary.test b/docroot/sites/all/modules/contrib/views/tests/views_glossary.test index 56d4a979..2d4131e6 100644 --- a/docroot/sites/all/modules/contrib/views/tests/views_glossary.test +++ b/docroot/sites/all/modules/contrib/views/tests/views_glossary.test @@ -35,22 +35,47 @@ class ViewsGlossaryTestCase extends ViewsSqlTest { 'a' => 3, 'l' => 6, ); - $nodes = array(); + $published = array(); + $unpublished = array(); foreach ($nodes_per_character as $character => $count) { $setting = array( 'type' => $type->type, ); - for ($i = 0; $i < $count; $i++) { + for ($i = 0; $i < $count + 1; $i++) { $node = $setting; $node['title'] = $character . strtolower($this->randomName()); - $nodes[$character][] = $this->drupalCreateNode($node); + + // Make the first node unpublished, which will allow testing to make + // sure that only published nodes are displayed. Also, don't add it to + // the array of expected nodes. + if ($i === 0) { + $node['status'] = 0; + $test_node = $this->drupalCreateNode($node); + $unpublished[$test_node->nid] = $test_node; + } + else { + $published[$character][] = $this->drupalCreateNode($node); + } } } + // Verify that there are the same number of unpublished nodeas as there are + // letters. + $this->assertEqual(count($unpublished), count($nodes_per_character)); + + // Verify that each unpublished item is a full node and that each one starts + // with a letter from the list. + foreach ($unpublished as $node) { + $this->assertTrue(is_object($node)); + $this->assertTrue(!empty($node->nid)); + $first_letter = substr($node->title, 0, 1); + $this->assertTrue(isset($nodes_per_character[$first_letter])); + } + // Sort created nodes the same way the view does, so that we can assert // correct node ids for each row in the result set later. foreach ($nodes_per_character as $character => $count) { - usort($nodes[$character], function ($a, $b) { + usort($published[$character], function ($a, $b) { return strcmp($a->title, $b->title); }); } @@ -60,7 +85,8 @@ class ViewsGlossaryTestCase extends ViewsSqlTest { $view->set_display('attachment'); $view->execute_display('attachment'); - // Check the amount of nodes per character. + // Check the amount of nodes per character - note that the unpublished nodes + // will not be included. foreach ($view->result as $item) { $this->assertEqual($nodes_per_character[$item->title_truncated], $item->num_records); } @@ -75,7 +101,8 @@ class ViewsGlossaryTestCase extends ViewsSqlTest { $this->assertIdentical($result_count, 3, 'View has 3 results.'); foreach ($view->result as $delta => $item) { $nid = isset($view->result[$delta]->nid) ? $view->result[$delta]->nid : '0'; - $this->assertIdentical($nid, $nodes['a'][$delta]->nid, 'View result ' . (string) (int) $delta . ' has correct node id.'); + $this->assertIdentical($nid, $published['a'][$delta]->nid, 'View result ' . (string) (int) $delta . ' has correct node id.'); + $this->assertFalse(isset($unpublished[$nid])); } $view->destroy(); @@ -91,11 +118,11 @@ class ViewsGlossaryTestCase extends ViewsSqlTest { $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0; $this->assertIdentical($result_count, 3, 'View has 3 results.'); $nid = isset($view->result[0]->nid) ? $view->result[0]->nid : '0'; - $this->assertIdentical($nid, $nodes['d'][0]->nid, 'View result 0 has correct node id.'); + $this->assertIdentical($nid, $published['d'][0]->nid, 'View result 0 has correct node id.'); $nid = isset($view->result[1]->nid) ? $view->result[1]->nid : '0'; - $this->assertIdentical($nid, $nodes['p'][0]->nid, 'View result 1 has correct node id.'); + $this->assertIdentical($nid, $published['p'][0]->nid, 'View result 1 has correct node id.'); $nid = isset($view->result[2]->nid) ? $view->result[2]->nid : '0'; - $this->assertIdentical($nid, $nodes['p'][1]->nid, 'View result 2 has correct node id.'); + $this->assertIdentical($nid, $published['p'][1]->nid, 'View result 2 has correct node id.'); $view->destroy(); // Checks that a glossary view with a phrase as an argument does not @@ -139,7 +166,7 @@ class ViewsGlossaryTestCase extends ViewsSqlTest { $character_delta = 0; } $nid = isset($view->result[$delta]->nid) ? $view->result[$delta]->nid : '0'; - $this->assertIdentical($nid, $nodes[$character][$character_delta]->nid, 'View result ' . (string) (int) $delta . ' has correct node id.'); + $this->assertIdentical($nid, $published[$character][$character_delta]->nid, 'View result ' . (string) (int) $delta . ' has correct node id.'); $character_delta++; } $view->destroy(); @@ -171,7 +198,7 @@ class ViewsGlossaryTestCase extends ViewsSqlTest { $character_delta = 0; } $nid = isset($view->result[$delta]->nid) ? $view->result[$delta]->nid : '0'; - $this->assertIdentical($nid, $nodes[$character][$character_delta]->nid, 'View result ' . (string) (int) $delta . ' has correct node id.'); + $this->assertIdentical($nid, $published[$character][$character_delta]->nid, 'View result ' . (string) (int) $delta . ' has correct node id.'); $character_delta++; } $view->destroy(); diff --git a/docroot/sites/all/modules/contrib/views/tests/views_test.info b/docroot/sites/all/modules/contrib/views/tests/views_test.info index d3ce59dd..40066659 100644 --- a/docroot/sites/all/modules/contrib/views/tests/views_test.info +++ b/docroot/sites/all/modules/contrib/views/tests/views_test.info @@ -5,8 +5,8 @@ core = 7.x dependencies[] = views hidden = TRUE -; Information added by Drupal.org packaging script on 2020-03-07 -version = "7.x-3.24" +; Information added by Drupal.org packaging script on 2021-09-09 +version = "7.x-3.25" core = "7.x" project = "views" -datestamp = "1583615732" +datestamp = "1631208790" diff --git a/docroot/sites/all/modules/contrib/views/tests/views_test.views_default.inc b/docroot/sites/all/modules/contrib/views/tests/views_test.views_default.inc index a494a4e3..8d03a472 100644 --- a/docroot/sites/all/modules/contrib/views/tests/views_test.views_default.inc +++ b/docroot/sites/all/modules/contrib/views/tests/views_test.views_default.inc @@ -13,21 +13,26 @@ function views_test_views_default_views() { $view->name = 'test_views_groupby_save'; $view->description = ''; $view->tag = ''; - $view->view_php = ''; $view->base_table = 'node'; - $view->is_cacheable = FALSE; - $view->api_version = 2; - $view->version = 7; + $view->human_name = ''; + $view->core = 0; + $view->api_version = '3.0'; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none'; + $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['pager']['type'] = 'none'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'fields'; + /* Field: Content: Title */ + $handler->display->display_options['fields']['title']['id'] = 'title'; + $handler->display->display_options['fields']['title']['table'] = 'node'; + $handler->display->display_options['fields']['title']['field'] = 'title'; $views[$view->name] = $view; @@ -43,6 +48,7 @@ function views_test_views_default_views() { /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; @@ -52,8 +58,6 @@ function views_test_views_default_views() { $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'node'; - $handler->display->display_options['row_options']['links'] = 1; - $handler->display->display_options['row_options']['comments'] = 0; /* Filter criterion: Content: Type */ $handler->display->display_options['filters']['type']['id'] = 'type'; $handler->display->display_options['filters']['type']['table'] = 'node'; @@ -62,7 +66,6 @@ function views_test_views_default_views() { $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op'; $handler->display->display_options['filters']['type']['expose']['label'] = 'Content: Type'; $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type'; - $handler->display->display_options['filters']['type']['expose']['reduce'] = 0; /* Display: Page */ $handler = $view->new_display('page', 'Page', 'page_1'); @@ -74,32 +77,34 @@ function views_test_views_default_views() { $view->name = 'test_exposed_admin_ui'; $view->description = ''; $view->tag = ''; - $view->view_php = ''; $view->base_table = 'node'; - $view->is_cacheable = FALSE; - $view->api_version = 2; - $view->version = 7; + $view->human_name = ''; + $view->core = 0; + $view->api_version = '3.0'; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none'; + $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE; - $handler->display->display_options['pager']['type'] = 'full'; + $handler->display->display_options['pager']['type'] = 'none'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'node'; - $handler->display->display_options['row_options']['links'] = 1; - $handler->display->display_options['row_options']['comments'] = 0; /* Sort criterion: Content: Post date */ $handler->display->display_options['sorts']['created']['id'] = 'created'; $handler->display->display_options['sorts']['created']['table'] = 'node'; $handler->display->display_options['sorts']['created']['field'] = 'created'; - /* Filter: Content: Type */ + /* Filter criterion: Content: Type */ $handler->display->display_options['filters']['type']['id'] = 'type'; $handler->display->display_options['filters']['type']['table'] = 'node'; $handler->display->display_options['filters']['type']['field'] = 'type'; + $handler->display->display_options['filters']['type']['value'] = array( + 'article' => 'article', + ); $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op'; $handler->display->display_options['filters']['type']['expose']['label'] = 'Content: Type'; $handler->display->display_options['filters']['type']['expose']['use_operator'] = TRUE; @@ -114,31 +119,34 @@ function views_test_views_default_views() { $view->name = 'test_filter_in_operator_ui'; $view->description = ''; $view->tag = ''; - $view->view_php = ''; $view->base_table = 'node'; - $view->is_cacheable = FALSE; - $view->api_version = 2; - $view->version = 7; + $view->human_name = ''; + $view->core = 0; + $view->api_version = '3.0'; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none'; + $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['exposed_form']['type'] = 'basic'; - $handler->display->display_options['pager']['type'] = 'full'; + $handler->display->display_options['pager']['type'] = 'none'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'fields'; - /* Filter: Content: Type */ + /* Field: Content: Title */ + $handler->display->display_options['fields']['title']['id'] = 'title'; + $handler->display->display_options['fields']['title']['table'] = 'node'; + $handler->display->display_options['fields']['title']['field'] = 'title'; + /* Filter criterion: Content: Type */ $handler->display->display_options['filters']['type']['id'] = 'type'; $handler->display->display_options['filters']['type']['table'] = 'node'; $handler->display->display_options['filters']['type']['field'] = 'type'; $handler->display->display_options['filters']['type']['exposed'] = TRUE; $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op'; $handler->display->display_options['filters']['type']['expose']['label'] = 'Content: Type'; - $handler->display->display_options['filters']['type']['expose']['use_operator'] = 0; $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type'; - $handler->display->display_options['filters']['type']['expose']['reduce'] = 0; $views[$view->name] = $view; @@ -146,16 +154,18 @@ function views_test_views_default_views() { $view->name = 'test_argument_default_current_user'; $view->description = ''; $view->tag = ''; - $view->view_php = ''; $view->base_table = 'node'; - $view->is_cacheable = FALSE; - $view->api_version = 3; + $view->human_name = ''; + $view->core = 0; + $view->api_version = '3.0'; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none'; + $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['pager']['options']['items_per_page'] = '10'; @@ -167,21 +177,14 @@ function views_test_views_default_views() { $handler->display->display_options['fields']['title']['id'] = 'title'; $handler->display->display_options['fields']['title']['table'] = 'node'; $handler->display->display_options['fields']['title']['field'] = 'title'; - $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0; - $handler->display->display_options['fields']['title']['alter']['make_link'] = 0; - $handler->display->display_options['fields']['title']['alter']['trim'] = 0; - $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1; - $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1; - $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0; - $handler->display->display_options['fields']['title']['alter']['html'] = 0; - $handler->display->display_options['fields']['title']['hide_empty'] = 0; - $handler->display->display_options['fields']['title']['empty_zero'] = 0; - $handler->display->display_options['fields']['title']['link_to_node'] = 0; + $handler->display->display_options['fields']['title']['link_to_node'] = FALSE; /* Contextual filter: Content: Author uid */ $handler->display->display_options['arguments']['uid']['id'] = 'uid'; $handler->display->display_options['arguments']['uid']['table'] = 'node'; $handler->display->display_options['arguments']['uid']['field'] = 'uid'; $handler->display->display_options['arguments']['uid']['default_action'] = 'default'; + $handler->display->display_options['arguments']['uid']['default_argument_type'] = 'fixed'; + $handler->display->display_options['arguments']['uid']['summary']['format'] = 'default_summary'; $views[$view->name] = $view; @@ -190,12 +193,14 @@ function views_test_views_default_views() { $view->description = ''; $view->tag = ''; $view->base_table = 'node'; + $view->human_name = ''; $view->core = 7; $view->api_version = '3.0'; - $view->disabled = FALSE; + $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'time'; $handler->display->display_options['cache']['results_lifespan'] = '3600'; @@ -314,7 +319,6 @@ function views_test_views_default_views() { /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); - $handler->display->display_options['use_ajax'] = FALSE; $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none'; diff --git a/docroot/sites/all/modules/contrib/views/theme/theme.inc b/docroot/sites/all/modules/contrib/views/theme/theme.inc index 99b8efe7..e35b149e 100644 --- a/docroot/sites/all/modules/contrib/views/theme/theme.inc +++ b/docroot/sites/all/modules/contrib/views/theme/theme.inc @@ -93,7 +93,7 @@ function template_preprocess_views_view(&$vars) { $vars['attachment_before'] = !empty($view->attachment_before) ? $view->attachment_before : ''; $vars['attachment_after'] = !empty($view->attachment_after) ? $view->attachment_after : ''; - // Add contextual links to the view. We need to attach them to the dummy + // Add contextual links to the view. We need to attach them to the sample // $view_array variable, since contextual_preprocess() requires that they be // attached to an array (not an object) in order to process them. For our // purposes, it doesn't matter what we attach them to, since once they are @@ -199,7 +199,11 @@ function template_preprocess_views_view_fields(&$vars) { $object->handler = &$view->field[$id]; $object->inline = !empty($vars['options']['inline'][$id]); - $object->element_type = $object->handler->element_type(TRUE, !$vars['options']['default_field_elements'], $object->inline); + $default_field_elements_value = TRUE; + if (isset($vars['options']['default_field_elements'])) { + $default_field_elements_value = $vars['options']['default_field_elements']; + } + $object->element_type = $object->handler->element_type(TRUE, !$default_field_elements_value, $object->inline); if ($object->element_type) { $class = ''; if ($object->handler->options['element_default_classes']) { @@ -244,7 +248,7 @@ function template_preprocess_views_view_fields(&$vars) { $previous_inline = $object->inline; $object->inline_html = $object->handler->element_wrapper_type(TRUE, TRUE); - if ($object->inline_html === '' && $vars['options']['default_field_elements']) { + if ($object->inline_html === '' && $default_field_elements_value) { $object->inline_html = $object->inline ? 'span' : 'div'; } @@ -283,7 +287,7 @@ function template_preprocess_views_view_fields(&$vars) { $object->label_html .= ': '; } - $object->element_label_type = $object->handler->element_label_type(TRUE, !$vars['options']['default_field_elements']); + $object->element_label_type = $object->handler->element_label_type(TRUE, !$default_field_elements_value); if ($object->element_label_type) { $class = ''; if ($object->handler->options['element_default_classes']) { diff --git a/docroot/sites/all/modules/contrib/views/views.api.php b/docroot/sites/all/modules/contrib/views/views.api.php index dcf80195..3f51cc1b 100644 --- a/docroot/sites/all/modules/contrib/views/views.api.php +++ b/docroot/sites/all/modules/contrib/views/views.api.php @@ -466,10 +466,14 @@ function hook_views_data() { * * You can add/edit/remove existing tables defined by hook_views_data(). * - * This hook should be placed in MODULENAME.views.inc and it will be - * auto-loaded. MODULENAME.views.inc must be in the directory specified by the - * 'path' key returned by MODULENAME_views_api(), or the same directory as the - * .module file, if 'path' is unspecified. + * This hook should be placed in MODULENAME.views_default.inc and it will be + * auto-loaded. MODULENAME.views_default.inc must be in the directory specified + * by the 'path' key returned by MODULENAME_views_api(), or the same directory + * as the .module file, if 'path' is unspecified. + * + * After adding this hook to an existing module, you will need to clear the + * Drupal menu cache and the Views cache to have your default views be + * recognized. * * @param array $data * An array of all Views data, passed by reference. See hook_views_data() for @@ -497,9 +501,9 @@ function hook_views_data_alter(&$data) { // This example adds a relationship to table {foo}, so that 'foo' views can // add this table using a relationship. Because we don't want to write over - // the primary key field definition for the {foo}.fid field, we use a dummy - // field name as the key. - $data['foo']['dummy_name'] = array( + // the primary key field definition for the {foo}.fid field, we use a + // placeholder field name as the key. + $data['foo']['sample_name'] = array( 'title' => t('Example relationship'), 'help' => t('Example help'), 'relationship' => array( diff --git a/docroot/sites/all/modules/contrib/views/views.info b/docroot/sites/all/modules/contrib/views/views.info index df73eacc..38935b9c 100644 --- a/docroot/sites/all/modules/contrib/views/views.info +++ b/docroot/sites/all/modules/contrib/views/views.info @@ -330,8 +330,8 @@ files[] = tests/views_clone.test files[] = tests/views_view.test files[] = tests/views_ui.test -; Information added by Drupal.org packaging script on 2020-03-07 -version = "7.x-3.24" +; Information added by Drupal.org packaging script on 2021-09-09 +version = "7.x-3.25" core = "7.x" project = "views" -datestamp = "1583615732" +datestamp = "1631208790" diff --git a/docroot/sites/all/modules/contrib/views/views.module b/docroot/sites/all/modules/contrib/views/views.module index d37bfda9..602a0002 100644 --- a/docroot/sites/all/modules/contrib/views/views.module +++ b/docroot/sites/all/modules/contrib/views/views.module @@ -106,7 +106,7 @@ function views_theme($existing, $type, $theme, $path) { ); $variables = array( - // For displays, we pass in a dummy array as the first parameter, since + // For displays, we pass in a sample array as the first parameter, since // $view is an object but the core contextual_preprocess() function only // attaches contextual links when the primary theme argument is an array. 'display' => array('view_array' => array(), 'view' => NULL), @@ -491,7 +491,7 @@ function views_menu_alter(&$callbacks) { // of possible display IDs instead of a single ID. $callbacks[$path]['page arguments'][1] = (array) $callbacks[$path]['page arguments'][1]; $callbacks[$path]['page arguments'][1][] = $display_id; - $callbacks[$path]['access arguments'][] = $item['access arguments'][0]; + $callbacks[$path]['access arguments'] = $item['access arguments']; $callbacks[$path]['load arguments'][1] = (array) $callbacks[$path]['load arguments'][1]; $callbacks[$path]['load arguments'][1][] = $display_id; } @@ -968,7 +968,7 @@ function views_add_contextual_links(&$render_element, $location, $view, $display // contextual links that are intended to be displayed in the requested // location. $plugin = views_fetch_plugin_data('display', $view->display[$display_id]->display_plugin); - // If contextual links locations are not set, provide a sane default. (To + // If contextual links locations are not set, provide a simple default. (To // avoid displaying any contextual links at all, a display plugin can still // set 'contextual links locations' to, e.g., an empty array). $plugin += array('contextual links locations' => array('view')); @@ -1172,7 +1172,10 @@ function views_check_roles($rids, $account = NULL) { $account = isset($account) ? $account : $user; $roles = array_keys($account->roles); $roles[] = $account->uid ? DRUPAL_AUTHENTICATED_RID : DRUPAL_ANONYMOUS_RID; - return user_access('access all views', $account) || array_intersect(array_filter($rids), $roles); + $has_access = user_access('access all views', $account); + $rids = array_filter($rids); + $intersect = array_intersect($rids, $roles); + return $has_access || $intersect; } /** @@ -1488,7 +1491,7 @@ function views_get_plugin($type, $plugin, $reset = FALSE) { */ function views_get_localization_plugin() { $plugin = variable_get('views_localization_plugin', ''); - // Provide sane default values for the localization plugin. + // Provide default values for the localization plugin. if (empty($plugin)) { if (module_exists('locale')) { $plugin = 'core'; @@ -2105,7 +2108,7 @@ function views_form_views_form_submit($form, &$form_state) { */ function views_exposed_form($form, &$form_state) { // Don't show the form when batch operations are in progress. - if ($batch = batch_get() && isset($batch['current_set'])) { + if (($batch = batch_get()) && isset($batch['current_set'])) { return array( // Set the theme callback to be nothing to avoid errors in // template_preprocess_views_exposed_form(). @@ -2430,12 +2433,39 @@ function _views_query_tag_alter_condition(QueryAlterableInterface $query, &$cond views_query_views_alter($condition['value']); } elseif (isset($condition['value'])) { - $condition['value'] = str_replace(array_keys($substitutions), array_values($substitutions), $condition['value']); + // Arrays need to be handled differently to strings as they could be + // nested. + if (is_array($condition['value'])) { + // Use the callback to walk through the value, performing the search- + // replace operation recursively. + array_walk_recursive($condition['value'], '_views_str_replace_recursive', array(array_keys($substitutions), array_values($substitutions))); + } + // Simple strings can simply use str_replace(). + else { + $condition['value'] = str_replace(array_keys($substitutions), array_values($substitutions), $condition['value']); + } } } } } +/** + * Callback for performing a string replacement via array_walk_recursive(). + * + * @param string $item + * A leaf from the original array. + * @param int $key + * The key for the current array item. + * @param array $args + * Element 0 is the items to search for, element 1 is the replacements. + * + * @see _views_query_tag_alter_condition() + */ +function _views_str_replace_recursive(&$item, $key, $args) { + list($search, $replace) = $args; + $item = str_replace($search, $replace, $item); +} + /** * Embed a view using a PHP snippet. * @@ -2564,7 +2594,8 @@ function views_var_export($var, $prefix = '', $init = TRUE) { /** * Prepare a string for use as a valid CSS identifier. * - * This function is similar to a core version but with more sane filter values. + * This function is similar to a core version but with more intuitive filter + * values. * http://www.w3.org/TR/CSS21/syndata.html#characters shows the syntax for valid * CSS identifiers (including element names, classes, and IDs in selectors). * diff --git a/docroot/sites/all/modules/contrib/views/views_ui.info b/docroot/sites/all/modules/contrib/views/views_ui.info index 88549716..fdb5f078 100644 --- a/docroot/sites/all/modules/contrib/views/views_ui.info +++ b/docroot/sites/all/modules/contrib/views/views_ui.info @@ -8,8 +8,8 @@ dependencies[] = views files[] = views_ui.module files[] = plugins/views_wizard/views_ui_base_views_wizard.class.php -; Information added by Drupal.org packaging script on 2020-03-07 -version = "7.x-3.24" +; Information added by Drupal.org packaging script on 2021-09-09 +version = "7.x-3.25" core = "7.x" project = "views" -datestamp = "1583615732" +datestamp = "1631208790"