all contrib module security updates done

This commit is contained in:
2020-09-24 22:47:32 +02:00
parent 7d87153100
commit 0fbb9c4610
1612 changed files with 116663 additions and 32269 deletions
@@ -80,6 +80,17 @@ function entityreference_field_views_data_views_data_alter(&$data, $field) {
'group' => t('Entity Reference'),
'title' => t('Referencing entity'),
'help' => t('A bridge to the @entity entity that is referencing @target_entity via !field_name', $replacements),
'join_extra' => array(
0 => array(
'field' => 'entity_type',
'value' => $entity_type,
),
1 => array(
'field' => 'deleted',
'value' => 0,
'numeric' => TRUE,
),
),
);
}
}
@@ -75,8 +75,16 @@ class entityreference_plugin_display extends views_plugin_display {
// Build the condition using the selected search fields
foreach ($style_options['search_fields'] as $field_alias) {
if (!empty($field_alias)) {
// Get the table and field names for the checked field
$field = $this->view->query->fields[$this->view->field[$field_alias]->field_alias];
// Get the table and field names for the checked field.
if (empty($this->view->field[$field_alias]->field_info)) {
$field = $this->view->query->fields[$this->view->field[$field_alias]->field_alias];
}
else {
$field_table = $this->view->query->ensure_table($this->view->field[$field_alias]->table, $this->view->field[$field_alias]->relationship);
$this->view->query->add_field($field_table, $this->view->field[$field_alias]->real_field, $this->view->field[$field_alias]->field, array());
$field = $this->view->query->fields[$this->view->field[$field_alias]->field];
}
// Add an OR condition for the field
$conditions->condition($field['table'] . '.' . $field['field'], $value, 'LIKE');
}
@@ -26,7 +26,7 @@ class entityreference_plugin_style extends views_plugin_style {
'#title' => t('Search fields'),
'#options' => $options,
'#required' => TRUE,
'#default_value' => $this->options['search_fields'],
'#default_value' => isset($this->options['search_fields']) ? $this->options['search_fields'] : array(),
'#description' => t('Select the field(s) that will be searched when using the autocomplete widget.'),
'#weight' => -3,
);
@@ -45,19 +45,17 @@ class entityreference_plugin_style extends views_plugin_style {
// Group the rows according to the grouping field, if specified.
$sets = $this->render_grouping($this->view->result, $this->options['grouping']);
// Grab the alias of the 'id' field added by entityreference_plugin_display.
$id_field_alias = $this->display->handler->id_field_alias;
// @todo We don't display grouping info for now. Could be useful for select
// widget, though.
$results = array();
$this->view->row_index = 0;
foreach ($sets as $records) {
foreach ($records as $values) {
foreach ($records as $index => $values) {
$this->view->row_index = $index;
// Sanitize html, remove line breaks and extra whitespace.
$results[$values->{$id_field_alias}] = filter_xss_admin(preg_replace('/\s\s+/', ' ', str_replace("\n", '', $this->row_plugin->render($values))));
$this->view->row_index++;
}
}
unset($this->view->row_index);